Zen of Python
ark at acm.org
Sat Jan 22 11:55:45 EST 2005
"Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
news:7xu0p9lk4h.fsf at ruckus.brouhaha.com...
> It's really irrelevant whether anyone is using a feature or not. If
> the feature is documented as being available, it means that removing
> it is an incompatible change that can break existing code which
> currently conforms to the spec. If the "feature" is described as the
> bug that it is, anything that relies on it is nonconformant.
In this case, I think the right solution to the problem is two-fold:
1) from __future__ import lexical_comprehensions
2) If you don't import the feature, and you write a program that depends
a list-comprehension variable remaining in scope, the compiler should
issue a diagnostic along the lines of
Warning: This program should be taken out and shot.
More information about the Python-list