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.
Due to the reasons discussed here
we will be moving to python-forum.io
on October 1, 2016.
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.