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 eli.bendersky
Recipients barry, eli.bendersky, eric.smith, ethan.furman, serhiy.storchaka
Date 2013-08-14.18:55:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAF-Rda9xZJC1ZyYbAhAV0ttt=CC3K6P2OXZYDdOrCvRQGbsmNw@mail.gmail.com>
In-reply-to <520BD11B.3040804@stoneleaf.us>
Content
On Wed, Aug 14, 2013 at 11:48 AM, Ethan Furman <report@bugs.python.org>wrote:

>
> Ethan Furman added the comment:
>
> > Eric V. Smith added the comment:
> >
> > For the format version, what gets called is:
> >
> > int_subclass.__format__('d'), which is int.__format__(int_subclass,
> > 'd'), which produces '1', assuming int(int_subclass) is 1.
>
> Ah, I didn't realize.  Thanks.
>
> > So, there's no "str" involved anywhere, except the one on which
> > .format() is called ('{:d}'), and it doesn't know about the types of any
> > arguments or what the format specifiers mean, so it can't make any
> > decisions.
>
> As far as format goes, I don't think there is a problem.  It's behaving
> just like it should (which makes sense, since
> IntEnum is derived from int and is already using int's __format__ by
> default).
>

I'm not sure I understand. The discrepancy between {:} and {:10} is clearly
a problem.
History
Date User Action Args
2013-08-14 18:55:05eli.benderskysetrecipients: + eli.bendersky, barry, eric.smith, ethan.furman, serhiy.storchaka
2013-08-14 18:55:05eli.benderskylinkissue18738 messages
2013-08-14 18:55:05eli.benderskycreate