Force anything to be a string.

Carel Fellinger cfelling at iae.nl
Sun Sep 19 12:33:07 EDT 1999


jonathon <jblake at stamp-coin.com> wrote:
> On Sat, 18 Sep 1999, Tim Peters wrote:
...
>>Using the builtin str function was the correct approach from the start.
>>From the error msgs you're getting, it looks most likely that you
>>accidentally rebound the name "str" to a string, so "str" no longer refers
...
> 	A little poking around, and I found an object called
> 	str in two modules that the script calls.   After changing
> 	the name of those variables, that error disappeared.  :-)

>>to the builtin function (builtin function names are not reserved, which is
>>both a feature and a bug <0.7>).

> 	A bug, IMNSHO.   A really bad bug, since I wasn't even using a
	module I wrote.   

You probably used `from other_module import *', you naughty boy:)
>From the docs I learned not to do that unless the imported module
was specifically designed for that construct, like Tkinter.

-- 
groetjes, carel




More information about the Python-list mailing list