[Python-checkins] CVS: python/dist/src/Lib doctest.py,1.14,1.15
Tim Peters
tim_one@users.sourceforge.net
Sun, 15 Jul 2001 22:37:26 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv22251/python/dist/src/Lib
Modified Files:
doctest.py
Log Message:
Ugly. A pile of new xxxFlags() functions, to communicate to the parser
that 'yield' is a keyword. This doesn't help test_generators at all! I
don't know why not. These things do work now (and didn't before this
patch):
1. "from __future__ import generators" now works in a native shell.
2. Similarly "python -i xxx.py" now has generators enabled in the
shell if xxx.py had them enabled.
3. This program (which was my doctest proxy) works fine:
from __future__ import generators
source = """\
def f():
yield 1
"""
exec compile(source, "", "single") in globals()
print type(f())
Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** doctest.py 2001/06/24 20:24:16 1.14
--- doctest.py 2001/07/16 05:37:24 1.15
***************
*** 349,352 ****
--- 349,354 ----
# string method conversion
+ from __future__ import generators
+
__version__ = 0, 9, 7