Message195217
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). |
|
Date |
User |
Action |
Args |
2013-08-14 21:22:30 | eric.smith | set | recipients:
+ eric.smith, barry, eli.bendersky, ethan.furman, serhiy.storchaka |
2013-08-14 21:22:30 | eric.smith | set | messageid: <1376515350.17.0.747291787089.issue18738@psf.upfronthosting.co.za> |
2013-08-14 21:22:30 | eric.smith | link | issue18738 messages |
2013-08-14 21:22:30 | eric.smith | create | |
|