Path: csiph.com!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'works.': 0.07; 'dict': 0.09; 'received:internal': 0.09; 'sane': 0.09; 'do,': 0.15; 'ah,': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'wrote:': 0.16; '2015': 0.20; 'work,': 0.21; 'logical': 0.22; 'sep': 0.22; 'am,': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'sense': 0.26; 'chris': 0.26; 'fri,': 0.27; 'updating': 0.27; 'behaviour': 0.29; 'documenting': 0.29; 'work.': 0.30; 'certainly': 0.30; 'returned': 0.32; 'source': 0.33; 'but': 0.36; 'created': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; '12,': 0.37; "won't": 0.38; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'from:no real name:2**0': 0.60; 'header:Message-Id:1': 0.61; 'worth': 0.67; 'locals': 0.84; 'using.': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=WnHqpsfKvEFzAJDfQVDNnCzCvdY=; b=bBA8Vi E3VtaO7e6S2y344XA6Mo2tU3x6zF2oobE6+pEYYmc2JJUkUzbmCfccl6Bo+n0aHa lX+Nh20y7p6XVb0TT7ZBGEEhl0QFXK1enkk7QiH7ORgOoeS1iyqfsTnvBN19McBj HevPtmcRP7H0L45G9q7U2m/aF9pZHeTEzJW6I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=WnHqpsfKvEFzAJD fQVDNnCzCvdY=; b=Trl9hAOk1NowjfosVYbV/F6BpvqVMpXS52F9tM8NaQJS7B0 zxaYBMKNMuwB/i4t291pGN7H0uUqu3FouEp+HmHz935DvM1R8Rd8E3nU3t6sCfQ4 wKy2vy0ONDzXkDs1LBex6mgIE8Pd7X7uhm2vJuL+G2L6BJ7logIdqKwIpS1U= X-Sasl-Enc: mfaF1kEZ0CJoWysBa48/0R3z/Q5OQzmhiPcjuTyMFRNj 1441987052 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-c76b43ce In-Reply-To: References: <55f293da$0$1640$c3e8da3$5496439d@news.astraweb.com> Subject: Re: Python handles globals badly. Date: Fri, 11 Sep 2015 11:57:32 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441987055 news.xs4all.nl 23776 [2001:888:2000:d::a6]:46348 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96353 On Fri, Sep 11, 2015, at 11:55, Chris Angelico wrote: > On Sat, Sep 12, 2015 at 1:49 AM, Ian Kelly wrote: > > Ah, that makes sense. It's writing into the dict that is created and > > returned by locals(), but not actually updating the frame locals which > > are the source of truth. > > Yeah... but it only makes sense to people who understand the > implementation. It's certainly not a logical and sane behaviour that > would be worth documenting and using. What else would you document? Reading from them is a reasonable thing to do, and works. Writing to them is a reasonable thing to want to do, but won't work, so you need to document that it doesn't work.