A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-August/127954.html below:

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

[Python-Dev] format and int subclasses (Was: format, int, and IntEnum)Serhiy Storchaka storchaka at gmail.com
Thu Aug 15 01:01:15 CEST 2013
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 surprising we can extend this behavior for format specifier with 
the width, the alignment and the fill character but without the type 
char. I.e. int.__format__(x. '_<10') should return same as 
format(str(x), '_<10').

The question remains what to do with the sign option. And with the '=' 
alignment.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4