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 -- http://mail.python.org/mailman/listinfo/python-list