A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/101457.html below:

[Python-Dev] set/dict comprehensions don't leak in Py2.7

[Python-Dev] set/dict comprehensions don't leak in Py2.7 - intentional? [Python-Dev] set/dict comprehensions don't leak in Py2.7 - intentional?Stefan Behnel stefan_ml at behnel.de
Mon Jul 5 15:06:22 CEST 2010
Hi,

I only noticed now that set/dict comprehensions were backported to 2.7 
without letting the loop Variables leak into the surrounding scope. So they 
now behave different from list comprehensions. Is this intentional or just 
a backporting oversight?

I'm asking because we had a discussion about the 'right' semantics several 
times on the Cython list, and the current behaviour is that all 
comprehensions leak when compiling Py2 code and the do not leak when 
compiling Py3 code. I would hate to fix that up to match 2.7 and then see 
that the behaviour in Py2.7 is to be considered an accident.

Stefan

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4