Created
August 25, 2011 18:36
-
-
Save olemb/1171411 to your computer and use it in GitHub Desktop.
Revisions
-
olemb revised this gist
Aug 25, 2011 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ Today's lesson: Never call your module types.py if you plan to run Python from when standing in the same directory. It took me some time to figure out what was going on: $ touch types.py # empty file $ python -
olemb created this gist
Aug 25, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ Today's lesson: Never call your module types.py if you plan to run Python from when standing in the same directory. It took me some time to figure out what was going on: $ touch types.py # empty file $ python Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 68, in <module> import os File "/usr/lib/python2.7/os.py", line 398, in <module> import UserDict File "/usr/lib/python2.7/UserDict.py", line 83, in <module> import _abcoll File "/usr/lib/python2.7/_abcoll.py", line 70, in <module> Iterable.register(str) File "/usr/lib/python2.7/abc.py", line 107, in register if not isinstance(subclass, (type, types.ClassType)): AttributeError: 'module' object has no attribute 'ClassType' "Weeeaaht?"