Alexander Belopolsky <[email protected]> added the comment:
I wonder if this is subject to change. I find it odd that
>>> "{:g}".format(1e3)
'1000'
but one has to use % in
>>> "{:%Y}".format(datetime.now())
'2010'
It is also different from PEP 3101 recommendation:
"""
An example is the 'datetime' class,
whose format specifiers might look something like the
arguments to the strftime() function:
"Today is: {0:a b d H:M:S Y}".format(datetime.now())
"""
The above, however, should probably be
"Today is: {0:a} {0:b} {0:d} {0:H}:{0:M}:{0:S} {0:Y}".format(datetime.now())
----------
nosy: +belopolsky
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8913>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com