[python-win32] Problem with built-in str() function
John Hopkins
john@hopkinsit.com
Mon, 10 Jun 2002 20:24:27 -0700
Yep. that was it.
How embarrassing ...
John
----- Original Message -----
From: "Andrew Bennetts" <andrew@puzzling.org>
To: "John Hopkins" <john@hopkinsit.com>
Cc: <python-win32@python.org>
Sent: Monday, June 10, 2002 8:10 PM
Subject: Re: [python-win32] Problem with built-in str() function
> On Mon, Jun 10, 2002 at 07:53:12PM -0700, John Hopkins wrote:
> > I get the following output:
> >
> > items[x][2] = 3
> > Traceback (most recent call last):
> > File "LabTracker_Dev.py", line 356, in OnFindClick
> > self.SearchList.SetStringItem(x, 2, str(items[x][2]))
> > TypeError: 'str' object is not callable
> >
> > This is so basic that I'm utterly lost.
> >
> > I feel silly, but can anybody help me with this?
>
> Search for "str = " or "def ...(..., str, ...)" in your source. You
> almost certainly are using "str" as a variable, thus overriding the
> builtin. Perhaps pychecker (http://pychecker.sf.net/) might help you
> find where you've overridden str -- but I'm not sure if it does that.
>
> -Andrew.
>
>
>