Issue 8878: IDLE - str(integer) - TypeError: 'str' object is not callable (original) (raw)

Issue8878

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 "", line 1, in TypeError: 'str' object is not callable >>> help(str) no Python documentation found for '4bf3e914'
History
Date User Action Args
2022-04-11 14:57:01 admin set github: 53124
2010-06-02 14:52:39 mark.dickinson set nosy: + mark.dickinsonmessages: +
2010-06-02 14:49:30 ezio.melotti set status: open -> closednosy: + ezio.melottimessages: + resolution: not a bugstage: resolved
2010-06-02 14:47:40 Stranger381 create