QuantumGhost
5/6/2015 - 1:11 PM

Test the scope of "from __future__ import unicode_literals"

Test the scope of "from future import unicode_literals"

# 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)
# coding=utf-8
from __future__ import unicode_literals

s = '你好'
u = u'你好'