Re: New Python 3.0 string formatting - really necessary?



On Sat, 20 Dec 2008 16:20:38 -0800, r wrote:

On Dec 20, 6:05 pm, Roy Smith <r...@xxxxxxxxx> wrote:

I had an interesting experience with this recently.  I was giving a
co-worker quick python into.  He's an experienced programer in various
languages, but this was his first exposure to python.

He got really hung up on the % syntax.  By (bad) luck, he was trying to
print a tuple (let's call it "t"), did

format % t

and was surprised at the result.  It set him off on a "but that's
stupid, blah, blah, blah" rant.  I haven't absorbed the new syntax well
enough to figure out if people will get hung up by this with the new
syntax.

It is stupid, more reason to fix the current problem instead creating a
whole new one.

Instead of just whinging, how about making a suggestion to fix it? Go on,
sit down for an hour or ten and try to work out how a BINARY OPERATOR
like % (that means it can only take TWO arguments) can deal with an
arbitrary number of arguments, *without* having any special cases.

Go on. Take your time. I'll be waiting.



One more big complaint "THE BACKSLASH PLAGUE". ever tried regexp?, or
file paths?. All because that little backslash char is a line
continuation character, maybe we should fix that.

This makes no sense whatsoever. How does the line continuation character
make any difference to backslashes inside a regex or a file path?

Again, instead of whinging, what's your suggestion to fix it? Another
suggestion, because your first:

Would your life end if '\' was not a continuation char?

is just stupid. The line continuation character is *irrelevant* to the
problem of backslashes inside strings. For all the use it is, you might
as well suggest changing the name None to Null.



--
Steven
.



Relevant Pages

  • Re: xmlrpc, httplib and SSL
    ... the SSL builtin to Python 2.3, so the latter builds yet another ... I *am not* volunteering to fix this. ... I can't even test fixes ... I will provide moral support and the ...
    (comp.lang.python)
  • Re: mutable default parameter problem [Prothon]
    ... I love Python dearly. ... So far you have only shown me an idiom that many say should not be used. ... If I also might make a general argument for the fix then let me continue. ... Dynamic var scoping fixed another Python gotcha which doesn't break ...
    (comp.lang.python)
  • Python startup speed fixed :-)
    ... I'm pleased to announced that the python startup speed problem is fixed. ... Using Python 2.3.5 with the fix: ... Accounting information (delta values): ... Elapsed CPU time: 0 00:00:03.86 ...
    (comp.os.vms)
  • Re: "no variable or argument declarations are necessary."
    ... Thiat in fact happens to me all the time and is an annoying aspect of ... If I forget to declare several variables in C, ... gives me several warning messages and I fix them in one edit. ... forget to initialize several variables in Python, ...
    (comp.lang.python)
  • Re: Problem copying files on setup
    ... I replaced the ram module and that seamed to fix it ... > retail upgrade of XP home on. ... In both cases, it gets hung up. ...
    (microsoft.public.windowsxp.setup_deployment)