[Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?
Guido van Rossum
guido at python.org
Sun Jun 1 03:59:05 CEST 2008
On Sat, May 31, 2008 at 4:41 PM, wesley chun <wescpy at gmail.com> wrote:
> somewhat on-topic, can i hear from some of you as far as use-cases for
> oct() and hex() [plus bin()] in Python code? i find "%x" or "%o" (and
> its variants) sufficient in serving my needs. in other words, why
> oct() and hex() built-in functions instead of elsewhere like in
> operator for those who desire a functional interface?
I use oct() and hex() all the time at the interactive prompt when I
have a funny number given in decimal and wonder if it's really a magic
bit pattern.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list