Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96353

Re: Python handles globals badly.

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 <random832@fastmail.us>
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 <CAPTjJmpRno8rZYowGFHimaGfL+3nJnFrbjjhusxT8S4+fy4axw@mail.gmail.com>
References <c3363$547e74fe$5419aafe$24179@news.ziggo.nl> <cd7b7ffa-a217-4b62-bad2-9095b33a2bb6@googlegroups.com> <mailman.344.1441931751.8327.python-list@python.org> <55f293da$0$1640$c3e8da3$5496439d@news.astraweb.com> <CALwzidnG6kQFd5nqpN87b9AdsAan81=_FR=sfC+o3N93K28DNA@mail.gmail.com> <CAPTjJmqV0A9tw_bbDC8Z2NyTJfXGZszbkQdKwb4dXRkd89+bJw@mail.gmail.com> <CALwzid=6B9HzF-PwcEsaYLBKAWeA8QtPLhN4EQrWw17pNoJyKw@mail.gmail.com> <CAPTjJmoCuVMCXpTKeX+PvDw6rA9oyGPpQTxJ2VptbvvVu3x5yw@mail.gmail.com> <CALwzidmV93KnjEqq7avaf=R8WbhTuKuQDKF1SkjkoxZXFOsxxg@mail.gmail.com> <CAPTjJmpRno8rZYowGFHimaGfL+3nJnFrbjjhusxT8S4+fy4axw@mail.gmail.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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.376.1441987055.8327.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Fri, Sep 11, 2015, at 11:55, Chris Angelico wrote:
> On Sat, Sep 12, 2015 at 1:49 AM, Ian Kelly <ian.g.kelly@gmail.com> 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Python handles globals badly. tdev@freenet.de - 2015-09-10 15:25 -0700
  Re: Python handles globals badly. Emile van Sebille <emile@fenx.com> - 2015-09-10 15:40 -0700
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-10 18:35 -0600
    Re: Python handles globals badly. Marko Rauhamaa <marko@pacujo.net> - 2015-09-11 07:34 +0300
      Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-11 14:59 +1000
        Re: Python handles globals badly. Marko Rauhamaa <marko@pacujo.net> - 2015-09-11 08:15 +0300
          Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-11 15:25 +1000
          Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-12 03:43 +0100
      Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-10 23:07 -0600
        Re: Python handles globals badly. Marko Rauhamaa <marko@pacujo.net> - 2015-09-11 08:27 +0300
      Re: Python handles globals badly. Rustom Mody <rustompmody@gmail.com> - 2015-09-11 00:39 -0700
    Re: Python handles globals badly. Steven D'Aprano <steve@pearwood.info> - 2015-09-11 18:42 +1000
      Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-11 19:16 +1000
      Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-11 09:03 -0600
        Re: Python handles globals badly. Steven D'Aprano <steve@pearwood.info> - 2015-09-12 17:00 +1000
      Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-12 01:15 +1000
      Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-11 09:27 -0600
      Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-12 01:44 +1000
      Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-11 09:49 -0600
      Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-12 01:55 +1000
      Re: Python handles globals badly. random832@fastmail.us - 2015-09-11 11:57 -0400
        Re: Python handles globals badly. Rustom Mody <rustompmody@gmail.com> - 2015-09-11 09:08 -0700
      Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2015-09-12 02:04 +1000
      Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-11 10:27 -0600
      Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-12 03:51 +0100
  Re: Python handles globals badly. MRAB <python@mrabarnett.plus.com> - 2015-09-11 02:17 +0100
  Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-12 03:27 +0100

csiph-web