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


Groups > comp.lang.python > #106897

Re: REMOVE ME

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: REMOVE ME
Date Tue, 12 Apr 2016 10:44:59 +1000
Lines 14
Message-ID <mailman.40.1460421909.15650.python-list@python.org> (permalink)
References <CALuqfDDNQ0N6xQXEKurzK1v0eVfU7jr6=-uvLT1zeGcf3vgexQ@mail.gmail.com> <CAPTjJmrdgBsSWUkNi+H8Tm8eqHA53pxVM-FP8ChqsxRNCeRNGA@mail.gmail.com> <570C28C9.3090103@o2.co.uk> <mailman.36.1460414670.15650.python-list@python.org> <570c2f00$0$1608$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmrabYEELZ6nV9ZDtQn=vVwkX_jN6+oc2y+aRPMpddCbBQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de EmOkyZnRNqP8csQxcTTNLQcJ/B7W07IIUT33+FzxkEoQ==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.09; 'happen.': 0.09; '2016': 0.16; '__del__': 0.16; 'attribute,': 0.16; 'called,': 0.16; 'exception;': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'assign': 0.22; 'am,': 0.23; 'defined': 0.23; 'references': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'example': 0.26; 'message-id:@mail.gmail.com': 0.27; 'raise': 0.29; 'regardless': 0.31; "can't": 0.32; 'class': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'tue,': 0.34; 'list': 0.34; 'gets': 0.35; 'received:google.com': 0.35; 'instance': 0.35; 'but': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'method': 0.37; '12,': 0.37; 'received:209': 0.38; 'does': 0.39; 'more...': 0.66; 'guaranteed': 0.67; 'chrisa': 0.84; 'to:none': 0.91; 'anywhere,': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=6aUjxnTseFIyOE8Iw/3p2RoB3sX4iPgBW4+j4AJuDzU=; b=AnSy0U5HSYnmkOgTG2A6DIu3OwYdIUi+2h984b2nH2BQx1hgdztoGj9JeZA6bl/alD D3qiCd9Kz/mDWSc/dymhVVv7cJSPqkAUp+xgd1p+fD6CyGNt8RCaQAHDMGjZeqGN+fUV B1wuypfg0mY/DlnN75b+3Hm+u06MhuYJbMBlvsWoYqi75VPNYq4YQIwCPYexvpwAJFYu /fiPoxU49j8r4D7PNLesxP/3CSrX203jkpuOTevDm4ljF1FnrbxtbfjIz2/DuwdslSFf O+KCT3DwFJJUrO4FPvkPKt2hOWb23YtXqW6rjDBoLoROP2oV30PRUuYHhaj3YyQiw/zs h5yw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=6aUjxnTseFIyOE8Iw/3p2RoB3sX4iPgBW4+j4AJuDzU=; b=XiHJsDRXl5wD/v56oLu/GPbckSlFnDPaeHAlXeUD2Tf4Wup320gDa4jMV+8BLDZOwN 1ufaJZ2FSHvURA3I5ScOzjOP5/bYV7t2agYXTYHmi4ZkTHpNY6zVj2WupAj6Whr/AORE Dzoy5gBSwXclhFYwkSvBJHyTzPjNRz7kp3ZwXU9XUO/0aFjgGBckmX9J5/DbMf+IVWzo fmUNnnBnIHeevDx1mMszLNxAWC+lNdr36qv3o7NGOnXI+wQaitAotd5xon5tenslXo90 Xp4vrO9ls+Ewze9khdrnC54+zVfFjmpZ99ASfGnTS0UEx3xKZ7SUojWBaI4EBARRKDcL Pg1g==
X-Gm-Message-State AOPr4FW8u5zSfzfKYf39OJXJWS1IsotsW5xm82vn8A/OTqGNm13OTtvxKaWRvqkjKd4E7NxtIn6h/CZGzuR7dg==
X-Received by 10.107.137.101 with SMTP id l98mr873608iod.31.1460421899879; Mon, 11 Apr 2016 17:44:59 -0700 (PDT)
In-Reply-To <570c2f00$0$1608$c3e8da3$5496439d@news.astraweb.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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>
X-Mailman-Original-Message-ID <CAPTjJmrabYEELZ6nV9ZDtQn=vVwkX_jN6+oc2y+aRPMpddCbBQ@mail.gmail.com>
X-Mailman-Original-References <CALuqfDDNQ0N6xQXEKurzK1v0eVfU7jr6=-uvLT1zeGcf3vgexQ@mail.gmail.com> <CAPTjJmrdgBsSWUkNi+H8Tm8eqHA53pxVM-FP8ChqsxRNCeRNGA@mail.gmail.com> <570C28C9.3090103@o2.co.uk> <mailman.36.1460414670.15650.python-list@python.org> <570c2f00$0$1608$c3e8da3$5496439d@news.astraweb.com>
Xref csiph.com comp.lang.python:106897

Show key headers only | View raw


On Tue, Apr 12, 2016 at 9:10 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> Hence "self.things" will return the same
> list each time, the one defined as a class attribute, regardless of
> which "self" does the lookup.
>
> If a method were to assign to the attribute, for example "self.things = []",
> that would create an instance attribute, but that doesn't happen.

Indeed. And the __del__ method is guaranteed always to raise an
exception; by the time __del__ gets called, there can't be any
references to the object anywhere, so it can't be in that list any
more...

ChrisA

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


Thread

Re: REMOVE ME John Pote <johnhpote@o2.co.uk> - 2016-04-11 23:44 +0100
  Re: REMOVE ME Steven D'Aprano <steve@pearwood.info> - 2016-04-12 09:10 +1000
    Re: REMOVE ME Chris Angelico <rosuav@gmail.com> - 2016-04-12 10:44 +1000

csiph-web