Created
May 6, 2011 13:17
-
-
Save trehn/958938 to your computer and use it in GitHub Desktop.
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
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) | |
>>> unicode | |
<type 'unicode'> | |
>>> def test(): | |
... if type("x") == unicode: | |
... print "the if above fails only if the next two lines are present" | |
... if False: | |
... unicode = 23 | |
... | |
>>> test() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "<stdin>", line 2, in test | |
UnboundLocalError: local variable 'unicode' referenced before assignment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment