New Python 3.0 string formatting - really necessary?

r rt8396 at gmail.com
Sat Dec 20 19:20:38 EST 2008


On Dec 20, 6:05 pm, Roy Smith <r... at panix.com> wrote:
> In article
> <b58f588a-e8db-41df-a488-f7df62d56... at w39g2000prb.googlegroups.com>,
>
>  walterbyrd <walterb... at iname.com> wrote:
> > On Dec 19, 10:25 am, Michael Torrie <torr... at gmail.com> wrote:
>
> > > Personally the new string formatter is sorely needed in Python.  
>
> > Really? You know, it's funny, but when I read problems that people
> > have with python, I don't remember seeing that. Loads of people
> > complain about the white space issue. Some people complain  about the
> > speed. Lots of complaints about certain quirky behavior, but I have
> > not come across any complaints about the string formatting.
>
> > In fact, from what I have seen, many of the "problems" being "fixed"
> > seem to be non-problems.
>
> > I dunno, maybe it's just me.
>
> 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.

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. Would your life end
if '\' was not a continuation char? Mine would not because i don't
write my code to need it. Python has real warts that need fixing, and
thats really hard for me to say, because i am such a fanboy of Python.



More information about the Python-list mailing list