int 2 binary: What do you think?

Alex Martelli aleaxit at yahoo.com
Thu May 10 09:36:21 EDT 2001


"Andrew Gaul" <gaul at spam.utexas.edu> wrote in message
news:slrn9fl4ma.gm8.gaul at meatring.cs.utexas.edu...
    ...
> It'd be nice if an equivalent built-in function was added in a future
> version of Python.

If such a builtin was added, I think it should not focus solely
on binary representation, but allow any base from 2 up to and
including 36, just like int() and long() do with their optional
2nd argument, but of course "in reverse".

In fact, perhaps adding a 2nd optional argument to str() might
be a better architecture than adding a new builtin!


Alex






More information about the Python-list mailing list