can compile function have a bug?

ygao ygao2004 at gmail.com
Sun Oct 8 04:35:01 CEST 2006


>>> compile('U"中"','c:/test','single')
<code object ? at 00F06B60, file "c:/test", line 1>
>>> d=compile('U"中"','c:/test','single')
>>> d
<code object ? at 00F06BA0, file "c:/test", line 1>
>>> exec(d)
u'\xd6\xd0'
>>> U"中"
u'\u4e2d'
>>>

why is the result different?
a bug or another reason?




More information about the Python-list mailing list