Ben Finney wrote:
Paul Rubin <http://[EMAIL PROTECTED]> writes:
I don't like square-bracket listcomps because they leak the index
variables to the outside.
According to PEP 289 <URL:http://www.python.org/dev/peps/pep-0289>,
this is an acknowledged wart that will be fixed in Python 3.0.
Has been.
IDLE 3.0b1
>>> a=[i for i in range(5)]
>>> i
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
i
NameError: name 'i' is not defined
--
http://mail.python.org/mailman/listinfo/python-list