[Python-ideas] str(<int>, base=<int>) as complement to int(<str>, base=<int>)
Guido van Rossum
guido at python.org
Thu Nov 1 19:52:25 CET 2007
We go over this about once a year. The conclusion is always the same:
there isn't enough use for bases other than 2, 8, 10, 16 to bother
including anything, and these are already covered by bin(), oct(),
str() and hex(). (bin() is in 3.0 and to be backported to 2.6.)
On 11/1/07, Adam Atlas <adam at atlas.st> wrote:
>
> On 31 Oct 2007, at 06:02, Christian Heimes wrote:
> > I know it's not a killer feature but it feels right to have a
> > complement. How do you like the idea?
> >
> > Christian
>
> How about extending the int type's (and other numeric types', perhaps)
> implementation of __format__ (for py3k -- PEP 3101) so that it can
> take an optional format specifier component indicating the base?
>
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-ideas
mailing list