from __future__ import generators
Terry Reedy
tjreedy at home.com
Fri Aug 10 23:09:02 EDT 2001
Guido van Rossum <guido at python.org> writes:
> If enough people prefer to always have the 'yield' keyword enabled,
we
> can do that. I thought that there would be a huge opposition
against
> breaking code this way, but maybe it's OK. At least 'yield' is
not a
> silent break.
If you do this, which might well be for the greater good ..., two
suggestions:
1. a global (wrt directory subtree) search/replace program based on
walk/tokenize.
(you could make provision thereof a condition for yield as default)
2. a noisy break - on Syntax error from misuse of yield: "yield is now
a keyword. If you were trying to use it as a variable name, use
something else instead."
Terry J. Reedy
More information about the Python-list
mailing list