Too much builtins (was Re: Python's simplicity philosophy

Andrew Dalke adalke at mindspring.com
Tue Nov 18 02:18:41 EST 2003


Georgy Pruss:
> Maybe, it's worth to have str(x,8) and str(x,16) instead of oct(x) and
hex(x)
> and make str() a true inverse function to int()?

What then are the results of
  str(30+44j, 16)
  str(3.1415926, 8)
  str([9, 8, 7], 8)
  str("A", 16)
  str({"A": 20}, 16)
?

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list