Skip to content

Instantly share code, notes, and snippets.

@QuantumGhost
Created May 6, 2015 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save QuantumGhost/65180ac9e240af547c33 to your computer and use it in GitHub Desktop.
Save QuantumGhost/65180ac9e240af547c33 to your computer and use it in GitHub Desktop.
Test the scope of "from __future__ import unicode_literals"
# coding=utf-8
from __future__ import unicode_literals
s = '你好'
u = u'你好'
# 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