Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.049 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'say,': 0.05; 'variables': 0.07; 'subject:variable': 0.16; 'wrote:': 0.18; 'aug': 0.22; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'returned': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'class': 0.32; 'url:python': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'url:mail': 0.40; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=B7G06Nf9YhlfzU9bGSjMUKxOOQHibuJwvR/1UJzXn94=; b=wg8A0YDY790z4DNpPw/ygigxmWtS7+eKhQ+Efw93YYosClkWR+JdslSXhBHK+e6xtw Gu+imE8cr+04zZk1NpYYstwcYxXD1XhUFyNjTNDIXUe6k9rfjvy9TQQJySMag22L/SUV 829qdPfDeWAEvjdFmpqoPWB4f+ID63qEqlpAEZD/hLInen/x3ioIO143f5xjqdRpYMWP +JffBdmEvNCyVia9i+j0MAYMk01TaZyloZsPPs9/pm5CRkdqaP0Ukjgw2Q+Kfxfxz00v itjqZqrd4Iw/4rYuN4OkFr/+GeaQg5JWldwkjRlJe5FSzazD1iNxwm9oWV9Xd35gWPP9 Tt2A== X-Received: by 10.66.171.204 with SMTP id aw12mr7358671pac.7.1376822450931; Sun, 18 Aug 2013 03:40:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <107941d9-a981-4dd6-8460-336afc16f025@googlegroups.com> References: <107941d9-a981-4dd6-8460-336afc16f025@googlegroups.com> From: Ian Kelly Date: Sun, 18 Aug 2013 04:40:10 -0600 Subject: Re: Local variable in a closure To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376822460 news.xs4all.nl 15938 [2001:888:2000:d::a6]:59381 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52654 f is nonlocal to times(), local to multiplier(). As the docs for the locals() function say, "Free variables are returned by locals() when it is called in function blocks, but not in class blocks." On Sun, Aug 18, 2013 at 3:41 AM, wrote: > Is f local or not? > http://pastebin.com/AKDJrbDs > -- > http://mail.python.org/mailman/listinfo/python-list