from __future__ import generators
Martin von Loewis
loewis at informatik.hu-berlin.de
Sun Aug 12 13:02:53 CEST 2001
Guido van Rossum <guido at python.org> writes:
> Use of 'yield' as an identifier is not a silent breakage -- there has
> to be at least one defining occurrence of yield when used as a
> variable, function, module or class name, and that will always be a
> syntax error.
Of course, in Python, there doesn't have to be a defining occurrence
of every identifier used:
globals()['yield'] = foo
would break silently if yield became a keyword without a future import.
More information about the Python-list