Message73710
# This program works fine with Python 2.5 and 2.6:
def f():
"""
>>> f()
'xyz'
"""
return "xyz"
if __name__ == "__main__":
import doctest
doctest.testmod()
But if you put the statement "from __future__ import unicode_literals"
at the start then it fails:
File "/tmp/test.py", line 5, in __main__.f
Failed example:
f()
Expected:
'xyz'
Got:
u'xyz'
I don't know if it is a bug or a feature but I didn't see any mention of
it in the bugs or docs so thought I'd mention it. |
|
Date |
User |
Action |
Args |
2008-09-24 12:38:22 | mark | set | recipients:
+ mark |
2008-09-24 12:38:22 | mark | set | messageid: <1222259902.44.0.148184723221.issue3955@psf.upfronthosting.co.za> |
2008-09-24 12:37:19 | mark | link | issue3955 messages |
2008-09-24 12:37:19 | mark | create | |
|