This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE - str(integer) - TypeError: 'str' object is not callable
Type: behavior Stage: resolved
Components: IDLE Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Stranger381, ezio.melotti, mark.dickinson
Priority: normal Keywords:

Created on 2010-06-02 14:47 by Stranger381, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
IDLE_err.txt Stranger381, 2010-06-02 14:47 IDLE - output
Messages (3)
msg106887 - (view) Author: Neil Crouch (Stranger381) Date: 2010-06-02 14:47
Unable to convert int to str in idle but from the cmd python prompt it work sfine.
msg106888 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-06-02 14:49
You probably did str = '4bf3e914' at some point and overridden str.
msg106889 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-06-02 14:52
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'
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 53124
2010-06-02 14:52:39mark.dickinsonsetnosy: + mark.dickinson
messages: + msg106889
2010-06-02 14:49:30ezio.melottisetstatus: open -> closed

nosy: + ezio.melotti
messages: + msg106888

resolution: not a bug
stage: resolved
2010-06-02 14:47:40Stranger381create