[Python-3000] PEP 3101 Updated

Eric Smith eric+python-dev at trueblade.com
Thu Aug 16 14:50:21 CEST 2007


Talin wrote:
> Alex Holkner wrote:
>> What is the behaviour of whitespace in a format specifier? e.g.
>> how much of the following is valid?
>>>> "{ foo . name : 20s }".format(foo=open('bar'))
>> Eric, it's your call :)

I'm okay with whitespace before the colon (or !, as the case may be). 
After the colon, I'd say it's significant and can't be automatically 
removed, because a particular formatter might care (for example, "%Y %M 
%D" for dates).
Currently the code doesn't allow whitespace before the colon. I can add 
this if time permits, once everything else is implemented.


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /