Created
August 25, 2011 18:36
-
-
Save olemb/1171411 to your computer and use it in GitHub Desktop.
types.py
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 characters
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?" |
I should buy you a beer , can't believe I did this
your python crashed?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh shitlord. This was really helpful.