[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Include parsetok.h,2.15,2.16 pythonrun.h,2.42,2.43
Mon, 16 Jul 2001 12:52:42 -0400
> parsetok.h pythonrun.h
> 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
> What's the problem with this, anyway ? Why would "from __future__ import
> generators" or special flags be necessary to enable the existance of
> generators ?
Sorry, I'm lost. Guido introduced a generators future-statement, and now
we're trying to get it to work the way PEP 236 says future statements work.
A future statement is needed because yield *will* be a new keyword in 2.3,
but is not in 2.2 (unless a module includes the generators
> I'd have thought it's just a parser directive (okay, so that's
> tricky to implement)
The new xxxFlags() functions allow passing in flags to the parser, and I
guess that's what "a parser directive" means to you.
> but to code that doesn't use 'yield' a generator
> is just another iterator, right ?
Right. Now what? I don't think I grasped what you were getting at.