help with str()

Tuxtrax See_my at Signature.com.invalid
Sun Apr 18 18:36:14 EDT 2004


In article <40826776$0$136$3a628fcd at reader1.nntp.hccnet.nl>,
 anton at vredegoor.doge.nl (Anton Vredegoor) wrote:

<snip>

> Maybe this rings a bell:
> 
>  Python 2.3.2 (#1, Oct  9 2003, 12:03:29) 
>  [GCC 3.3.1 (cygming special)] on cygwin
>  Type "help", "copyright", "credits" or "license" for more
> information.
>  >>> str(5)
>  '5'
>  >>> str = "don't do this"
>  >>> str(5)
>  Traceback (most recent call last):
>    File "<stdin>", line 1, in ?
>  TypeError: 'str' object is not callable
>  >>> 
> 
> Anton

Thanks Anton. That was exactly it. I had a variable ealier in the 
program called str. Changed that variable name to another, and the str() 
function worked fine. DOH!

I knew it was something simple. Most of my fopahs are.

again, thanks,

Mathew

-- 
ROT 13 this address to mail me:

bar jbeq abg guerr; uvtu qrfreg zna, gura nqq - ng lnubb qbg pbz.



More information about the Python-list mailing list