Created
May 6, 2015 13:11
-
-
Save QuantumGhost/65180ac9e240af547c33 to your computer and use it in GitHub Desktop.
Test the scope of "from __future__ import unicode_literals"
This file contains 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
# coding=utf-8 | |
from __future__ import unicode_literals | |
s = '你好' | |
u = u'你好' |
This file contains 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
# coding=utf-8 | |
import temp1 | |
print 'temp1' ,temp1.s, type(temp1.s) | |
print 'temp1', temp1.u, type(temp1.u) | |
s = '你好' | |
u = u'你好' | |
print 'temp2', s, type(s) | |
print 'temp2', u, type(u) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment