A RetroSearch Logo

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

Search Query:

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

[Python-Dev] from future import yield

[Python-Dev] from future import yield [Python-Dev] from future import yieldMartin von Loewis loewis@informatik.hu-berlin.de
Sat, 7 Jul 2001 20:38:35 +0200 (MEST)
> Regarding the yield statement: I'd love to require a future statement,
> but the current support for future statements doesn't support
> modifying the parser based on the presence of future statements, and I
> don't know how to resolve that, short of totally rewriting the parser
> or scanning ahead looking for a future statement with some regular
> expression.

The "directive" patch manages to conditionally introduce a new keyword,
namely directive. The trick is to introduce it into the grammar, but only
recognize it as a keyword if a flag is set. That approach could
be used for future imports also, although I'd much prefer to spell it

directive transitional yield

Regards,
Martin




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