Re: [Python-Dev] format and int subclasses (Was: format, int, and IntEnum)

2013-08-15 Thread Serhiy Storchaka
15.08.13 06:23, Eli Bendersky написав(ла): Yes, the problem here is certainly not IntEnum - specific; it's just that IntEnum is the first "for real" use case of subclassing 'int' in the stdlib. Even not the first. >> '{}'.format(True) 'True' >>> '{:10}'.format(True) ' 1'

Re: [Python-Dev] format and int subclasses (Was: format, int, and IntEnum)

2013-08-14 Thread Eli Bendersky
On Wed, Aug 14, 2013 at 4:01 PM, Serhiy Storchaka wrote: > 15.08.13 01:07, Ethan Furman написав(ла): > >> From http://bugs.python.org/**issue18738 >> : >> > > Actually the problem not only in IntEnum, but in any in subclass. > > Currently for empty format specif

[Python-Dev] format and int subclasses (Was: format, int, and IntEnum)

2013-08-14 Thread Serhiy Storchaka
15.08.13 01:07, Ethan Furman написав(ла): From http://bugs.python.org/issue18738: Actually the problem not only in IntEnum, but in any in subclass. Currently for empty format specifier int.__format__(x, '') returns str(x). But __str__ can be overloaded in a subclass. I think that for less s