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

Georgy Pruss see_signature__ at hotmail.com
Tue Nov 18 03:09:27 EST 2003


"Andrew Dalke" <adalke at mindspring.com> wrote in message news:lJjub.4602$sb4.2551 at newsread2.news.pas.earthlink.net...
| 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

I guess, the same as for
   hex(30+44j)
   oct(3.1415926)
   oct([9, 8, 7])
   hex("A")
   hex({"A": 20})

G-:






More information about the Python-list mailing list