string.atoi and string.atol broken?
Peter Otten
__peter__ at web.de
Wed Jan 26 02:58:45 EST 2005
Dan Bishop wrote:
>> def itoa(n, base):
>>assert 2 <= base <= 16
>
> Why have the restriction base <= 16? int() allows up to 36. All you
> need to do is
>
> BASE36_DIGITS = string.digits + string.lowercase
For no other reason than carelessness. I have not yet seen anything beyond
base-16 in the wild.
By the way, does anyone know the Greek name for 36?
Peter
More information about the Python-list
mailing list