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

Ville Vainio ville.spammehardvainio at spamtut.fi
Tue Nov 18 08:31:11 CET 2003


"Andrew Dalke" <adalke at mindspring.com> writes:

> 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)
> ?

TypeError?

-- 
Ville Vainio   http://www.students.tut.fi/~vainio24




More information about the Python-list mailing list