[Python-Dev] str with base

Raymond Hettinger raymond.hettinger at verizon.net
Thu Jan 19 08:26:12 CET 2006


Guido, we may be converging on a consensus for my proposal:

    base(value, radix=2)

So far no one has shot at it, and it has gathered +1's from Steven,
Alex, Brett, and Nick.

To keep it simple, the proposal is for the value to be any int or long.
With an underlying __base__ method call, it wouldn't be hard for someone
to build it out to support other numeric types if the need arises.

The output would have no prefixes.  As Alex pointed out, it is easier
and more direct to add those after the fact if needed.

Care to pronounce on it?


Raymond





More information about the Python-Dev mailing list