doctest

Tim Peters tim.one at home.com
Sun Jul 22 21:11:50 CEST 2001


[Thomas Heller, reverts the string-methods changes to doctest.py in
 current CVS Python]

> Thanks to cvs update -j 1.3 -j 1.2 and manually fixing the two or
> threee conflicts it was easy, with _one_ exception:
>
> There is a 'from __future__ import generators' line, which
> makes sense for 2.2, but throws SyntaxError in 2.1 and 2.0,
> and ImportError in 1.5.2.
> Unfortunately it cannot be wrapped by try: except: because
> it must occur at the beginning of the file.
> Any idea?

What are you trying to accomplish?  A single version of doctest that runs
under all versions of Python?  Then comment out that line and you're done.
The generator-future stmt is needed in CVS (only) so that test_generators.py
passes (doctest itself doesn't use generators), and the need is due to
unresolved general issues spelled out in PEP 236 (see the "Paritally
Resolved Problem: Runtime Compilation" section).





More information about the Python-list mailing list