Message73710
| Author |
mark |
| Recipients |
mark |
| Date |
2008年09月24日.12:37:19 |
| SpamBayes Score |
2.588732e-10 |
| Marked as misclassified |
No |
| Message-id |
<1222259902.44.0.148184723221.issue3955@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
# 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. |
|
History
|
|---|
| 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 |
|