Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'url:peps': 0.09; 'variables.': 0.09; 'bieber': 0.16; 'cliff': 0.16; 'declaimed': 0.16; 'definition,': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'received:wlfraed': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'wulfraed': 0.16; 'trying': 0.21; '(but': 0.21; 'url:home': 0.21; 'found,': 0.23; 'url:dev': 0.23; 'subject:List': 0.25; 'variable': 0.28; 'class': 0.29; 'problem': 0.29; 'outer': 0.30; 'subject:skip:i 10': 0.30; 'tue,': 0.32; 'list': 0.32; 'there': 0.33; 'header:X-Complaints- To:1': 0.34; 'lee': 0.34; 'loop': 0.34; 'subject:/': 0.34; 'to:addr:python-list': 0.35; 'url:python': 0.35; 'received:org': 0.36; 'issue': 0.37; 'charset:us-ascii': 0.37; 'received:76': 0.37; 'url:org': 0.39; 'to:addr:python.org': 0.40; 'strange': 0.68; 'dennis': 0.73 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: List comprehension/genexp inconsistency. Date: Tue, 20 Mar 2012 17:16:42 -0400 Organization: > Bestiaria Support Staff < References: <1332275002.10958.7.camel@jcdyer-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-99-231.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1332278407 news.xs4all.nl 6962 [2001:888:2000:d::a6]:55268 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21954 On Tue, 20 Mar 2012 16:23:22 -0400, "J. Cliff Dyer" declaimed the following in gmane.comp.python.general: > > When trying to create a class with a dual-loop generator expression in a > class definition, there is a strange scoping issue where the inner > variable is not found, (but the outer loop variable is found), while a > list comprehension has no problem finding both variables. > Read http://www.python.org/dev/peps/pep-0289/ -- in particular, look for the word "leak" -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/