[issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable

Mark Dickinson report at bugs.python.org
Wed Jun 2 16:52:40 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

The code you show works fine for me.

The error you're seeing is almost certainly the result of inadvertently using 'str' as a variable name earlier in the IDLE session:

Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> str = '4bf3e914'
>>> hell = str(123)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' object is not callable
>>> help(str)
no Python documentation found for '4bf3e914'

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8878>
_______________________________________


More information about the Python-bugs-list mailing list