This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients Ariel.Ben-Yehuda, berker.peksag, chris.jerdonek, eric.smith, ezio.melotti, loewis, serhiy.storchaka
Date 2012-09-16.19:06:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347822371.09.0.359032332234.issue15276@psf.upfronthosting.co.za>
In-reply-to
Content
I can't yet reproduce on my system, but after looking at the code, I believe the following are closer to the cause:

>>> format(10000, u'n')
>>> int.__format__(10000, u'n')

Incidentally, on my system, the following note in the docs is wrong:

"Note: format(value, format_spec) merely calls value.__format__(format_spec)."

(from http://docs.python.org/library/functions.html?#format )

>>> format(10000, u'n')
u'10000'
>>> 10000.__format__(u'n')
  File "<stdin>", line 1
    10000.__format__(u'n')
                   ^
SyntaxError: invalid syntax
>>> int.__format__(10000, u'n')
'10000'

Observe also that format() and int.__format__() return different types.
History
Date User Action Args
2012-09-16 19:06:11chris.jerdoneksetrecipients: + chris.jerdonek, loewis, eric.smith, ezio.melotti, berker.peksag, serhiy.storchaka, Ariel.Ben-Yehuda
2012-09-16 19:06:11chris.jerdoneksetmessageid: <1347822371.09.0.359032332234.issue15276@psf.upfronthosting.co.za>
2012-09-16 19:06:10chris.jerdoneklinkissue15276 messages
2012-09-16 19:06:10chris.jerdonekcreate