On Thu, Feb 24, 2011 at 12:23 PM, Chris Rebert <c...@rebertia.com> wrote:
> On Thu, Feb 24, 2011 at 8:41 AM, Verde Denim <tdl...@gmail.com> 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: > > Is this the *entire* contents of the file? I suspect not, and that > somewhere in it you assign to `int` as a variable, which should not be > done since it's the name of the built-in type. > > > x = '0D' > > y = '0x' + x > > print "%d" % int(y,0) > > TypeError: 'int' object is not callable > > > > what am i not seeing here?? > > Please include the full exception Traceback. > Also, add: > > print type(int), int > > just before the existing `print`. > > Cheers, > Chris > Found it... I can't believe I did this in the code... x = int = 0 ... Clobbered 'int' ... i hate n00b mistakes.
-- http://mail.python.org/mailman/listinfo/python-list