0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00
cpython/Include
Tim Peters fe2127d3cb 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())
2001-07-16 05:37:24 +00:00
..
abstract.h
bitset.h
bufferobject.h
cellobject.h
ceval.h Part way to allowing "from __future__ import generators" to communicate 2001-07-16 02:29:45 +00:00
classobject.h
cobject.h
codecs.h
compile.h Part way to allowing "from __future__ import generators" to communicate 2001-07-16 02:29:45 +00:00
complexobject.h
cStringIO.h
dictobject.h
errcode.h
eval.h
fileobject.h
floatobject.h
frameobject.h PyFrameObject: rename f_stackbottom to f_stacktop, since it points to 2001-06-23 05:26:56 +00:00
funcobject.h
graminit.h Merging the gen-branch into the main line, at Guido's direction. Yay! 2001-06-18 22:08:13 +00:00
grammar.h
import.h
intobject.h
intrcheck.h
iterobject.h
listobject.h
longintrepr.h
longobject.h
marshal.h
metagrammar.h
methodobject.h
modsupport.h
moduleobject.h
node.h
object.h
objimpl.h
opcode.h Merging the gen-branch into the main line, at Guido's direction. Yay! 2001-06-18 22:08:13 +00:00
osdefs.h
parsetok.h Ugly. A pile of new xxxFlags() functions, to communicate to the parser 2001-07-16 05:37:24 +00:00
patchlevel.h
pgenheaders.h
py_curses.h
pydebug.h
pyerrors.h
pyfpe.h
pygetopt.h
pymem.h
pyport.h
pystate.h This change adjusts the profiling/tracing support so that the common 2001-07-03 23:39:52 +00:00
Python.h Part way to allowing "from __future__ import generators" to communicate 2001-07-16 02:29:45 +00:00
pythonrun.h Ugly. A pile of new xxxFlags() functions, to communicate to the parser 2001-07-16 05:37:24 +00:00
pythread.h
rangeobject.h Re-add 'advanced' xrange features, adding DeprecationWarnings as discussed 2001-07-09 12:30:54 +00:00
sliceobject.h
stringobject.h
structmember.h
symtable.h Merging the gen-branch into the main line, at Guido's direction. Yay! 2001-06-18 22:08:13 +00:00
sysmodule.h
token.h
traceback.h
tupleobject.h
ucnhash.h
unicodeobject.h removed "register const" from scalar arguments to the unicode 2001-06-27 22:08:26 +00:00