New Python 3.0 string formatting - really necessary?
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Sun Dec 21 04:42:47 EST 2008
On Sat, 20 Dec 2008 15:27:43 -0800, walterbyrd 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.
Many newbie code I have seen avoids it by string concatenation:
greeting = 'Hello, my name is ' + name + ' and I am ' + str(age) + ' old.'
That's some kind of indirect complaint. :-)
> In fact, from what I have seen, many of the "problems" being "fixed"
> seem to be non-problems.
And even if nobody has problems with the limitations of ``%`` string
formatting why shouldn't they add a more flexible and powerful way!?
Python 3.0 is not a bug fix release.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list