On 2007-07-17, mosi <[EMAIL PROTECTED]> wrote:
> Thank you,
> this is great,
> I thought that this should be standard in python 2.4 or 2.5 or in some
> standard library (math ???)
> Didn`t find anything.

Support is built-in for string representations of numbers in other
than base 10, but conversions to integer is the only support.

You can do:

>>> d = int(s, base).

but not:

>>> s = str(d, base)

The % format operator can do hex and octal, I believe.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to