n00b formatting

MRAB python at mrabarnett.plus.com
Thu Feb 24 12:49:29 EST 2011


On 24/02/2011 16:41, Verde Denim wrote:
> hi, all
> i can't believe i don't see this, but
> python from the command line:
>  >>> x = '0D'
>  >>> y = '0x' + x
>  >>> print "%d" % int(y,0)
> 13
>
> content of testme.py:
> x = '0D'
> y = '0x' + x
> print "%d" % int(y,0)
> TypeError: 'int' object is not callable
>
> what am i not seeing here??
>
I can only assume that at some point you assigned an int to 'int'.



More information about the Python-list mailing list