John Nagle, 11.12.2010 00:51:
On 12/10/2010 3:25 PM, Stefan Behnel wrote:
Benjamin Kaplan, 11.12.2010 00:13:
On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote:

The only scopes Python has are module and function.

There's more. Both a lambda, and in Python 3.x,
list comprehensions, introduce a new scope.

To be a little more precise: in Py3, list comprehensions use the same kind of scope that generator expressions, set comprehensions and dict comprehensions always had.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to