That's definitely not the only difference. Take this example session
- Code: Select all
>>> for x in map: pass
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
for x in map: pass
TypeError: 'builtin_function_or_method' object is not iterable
is a built-in, and it's not iterable. Unless you overwrite the variable, you will get that exception. (You shouldn't overwrite it by the way, but instead rename your variable.) So if you're not getting that then you must be overwriting it somewhere earlier in the code. If you change the name from "map" to something else, that something else still isn't defined anywhere here.
Paste the whole of the file you're running, don't break it up as you tried to do above. If you don't want to post that make code, copy your file, edit down the copy, replicate the error, then post that new code here along with its associated traceback.
Join the #python-forum IRC channel on irc.freenode.net for off-topic chat!
Please prefer not to PM members. The point of the forum is so that anyone can benefit. We don't want to help you over PMs/emails/Skype chats that others can't benefit from