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 eric.smith
Recipients barry, eli.bendersky, eric.smith, ethan.furman, serhiy.storchaka
Date 2013-08-14.21:22:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376515350.17.0.747291787089.issue18738@psf.upfronthosting.co.za>
In-reply-to
Content
The value of int is always used, except when the format string is empty. PEP 3101 explicitly requires this behavior. "For all built-in types, an empty format specification will produce the equivalent of str(value)." The "built-in type" here refers to int, since IntEnum is derived from int (at least I think it is: I haven't followed the metaclass and multiple inheritance completely).

If you want it to be different, you need to implement __format__ for IntEnum or a base class (or the metaclass? again, I haven't checked).
History
Date User Action Args
2013-08-14 21:22:30eric.smithsetrecipients: + eric.smith, barry, eli.bendersky, ethan.furman, serhiy.storchaka
2013-08-14 21:22:30eric.smithsetmessageid: <1376515350.17.0.747291787089.issue18738@psf.upfronthosting.co.za>
2013-08-14 21:22:30eric.smithlinkissue18738 messages
2013-08-14 21:22:30eric.smithcreate