A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-July/016007.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Include parsetok.h,2.15,2.16 pythonrun.h,2.42,2.43

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Include parsetok.h,2.15,2.16 pythonrun.h,2.42,2.43Tim Peters tim@digicool.com
Mon, 16 Jul 2001 12:52:42 -0400
[Tim]
> 	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
> patch):

[Thomas Wouters]
> 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
future-statement).

> 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.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4