Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23043
___
___
Julien Palard added the comment:
Works for me in 2.7.8:
$ python --version
Python 2.7.8
# cat /tmp/test.py
#!/usr/bin/env python
from __future__ import print_function
def toto():
print (42, 43)
42 43
return 42
$ python -m doctest -v /tmp/test.py
Trying:
print (42,
Demian Brecht added the comment:
@Julien.Palard: There's a subtle difference between your test and the issue as
written. Your test lives within a module and therefore executes testmodule (see
https://hg.python.org/cpython/file/9f60d024e586/Lib/doctest.py#l1819) whereas
the issue reported uses
Demian Brecht added the comment:
it's been resolved in 3.5
Sorry, that statement can be a little misleading, possibly indicating that
something may have changed in the doctest globals handling. It was resolved in
3.5 because print is no longer a statement so this ambiguous behaviour resolved
New submission from Vjacheslav:
from __future__ import print_function
print (1,2)
1 2
in interactive session, but, with this 3 lines in tmp.txt:
python -m doctest tmp.txt
fails (prints tuple)
--
components: Library (Lib)
messages: 232577
nosy: fva
priority: normal
severity: normal
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23043
___
___