[Python-3000] Please don't kill the % operator...

"Martin v. Löwis" martin at v.loewis.de
Fri Aug 17 06:40:37 CEST 2007


Bill Janssen schrieb:
>> I think most of these points are irrelevant. The curly braces are not
>> just syntactic sugar, at least the opening brace is not; the digit
>> is not syntactic sugar in the case of message translations.
> 
> Are there "computation of matching braces" problems here?

I don't understand: AFAIK, the braces don't nest, so the closing
brace just marks the end of the place holder (which in the printf
format is defined by the type letter).

>> That lots of people are familiar with the old format and only few are
>> with the new is merely a matter of time.
> 
> Sure, but the problem is that there are a lot of Python programmers
> *now* and learning the new syntax imposes a burden on all of *them*.
> Who cares how many people know the syntax in the future?

That is the problem of any change, right? People know the current
language; they don't know the changed language. Still, there are
conditions when change is "allowed".

For example, the syntax of the except clause changes in Py3k, replacing
the comma with "as"; this is also a burden for all Python programmers,
yet the change has been made.

>> That the new format is more verbose than the old one is true, but only
>> slightly so - typing .format is actually easier for me than typing
>> % (which requires a shift key).
> 
> I don't mind the switch to ".format"; it's the formatting codes that I
> don't want to see changed.

Ok. For these, the "more verbose" argument holds even less: in the most
simple case, it's just one character more verbose per placeholder.

Regards,
Martin


More information about the Python-3000 mailing list