Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'operator': 0.03; 'true,': 0.04; 'correct.': 0.07; 'imply': 0.07; 'cc:addr:python-list': 0.09; 'objects.': 0.09; '"is': 0.16; 'container.': 0.16; 'correctness.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic': 0.16; 'subject:versus': 0.16; 'those,': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'minor': 0.22; 'sep': 0.22; 'sat,': 0.23; 'implemented': 0.24; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; 'container': 0.29; 'objects': 0.29; 'useful': 0.33; 'accessible': 0.33; 'received:google.com': 0.35; 'something': 0.35; 'but': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'agree': 0.37; 'method': 0.37; 'say': 0.37; '12,': 0.37; 'means': 0.39; 'test': 0.39; 'called': 0.40; 'some': 0.40; 'more': 0.63; 'complete': 0.63; 'here': 0.66; 'worth': 0.67; 'subjectcharset:utf-8': 0.71; '4:26': 0.84; 'chrisa': 0.84; 'concept.': 0.84; 'to:none': 0.91 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 :content-type:content-transfer-encoding; bh=AYR30peYZHiD1liIAV8uqRth0AO8ziesDj1rlLNxCPw=; b=B2VNlESJE5IfApm9NjCK+LOo10YvzYnRoGUG8jNDGndrm2+9Mpikn1XX6/I0bw1F3f /LYqgeT8sW4IguIxfBTOQZvh5lz/VcZTyjAqyoXUI/YvrzdMVcWXPQmfIG12JWeUUpY9 TXVoDgGCDEYbhbf0CF4X+O5AHESheanFo/qsg0dCpPmMAgwHpyjkZY4Uw3lUkPJO0P+K HzZm5uMy5cLdsaRMyHMaWxDFfJSPd8o5mQpspO0PSIPZFxy3IF0N5Hazemj0jVMF49Ii ZlDXjEgeEctZPPh/nNqOejXsm+nSQ7T1an9u9gPIji16FaySCCjzrB+v/vZfQgaoIHUh iGnA== MIME-Version: 1.0 X-Received: by 10.107.132.144 with SMTP id o16mr9043537ioi.31.1442039476669; Fri, 11 Sep 2015 23:31:16 -0700 (PDT) In-Reply-To: <858u8c6tlu.fsf@benfinney.id.au> References: <14afe27e-0bd5-410f-8e64-0f31d496ebf2@googlegroups.com> <55F36B4C.9020007@gmail.com> <1442016698.95299.381478313.2487CA0E@webmail.messagingengine.com> <85mvws6z45.fsf_-_@benfinney.id.au> <85io7g6xy4.fsf@benfinney.id.au> <85egi46wng.fsf@benfinney.id.au> <858u8c6tlu.fsf@benfinney.id.au> Date: Sat, 12 Sep 2015 16:31:16 +1000 Subject: =?UTF-8?B?UmU6IFRlcm1pbm9sb2d5OiDigJxyZWZlcmVuY2XigJ0gdmVyc3VzIOKAnHBvaW50ZXI=?= =?UTF-8?B?4oCd?= From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442039484 news.xs4all.nl 23771 [2001:888:2000:d::a6]:48068 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96416 On Sat, Sep 12, 2015 at 4:26 PM, Ben Finney wr= ote: > If you do agree with those, some corollaries follow: > > * Container types do not contain objects. > > It is a useful analogy to say the objects are =E2=80=9Cin=E2=80=9D the = container; but > that would imply they are not simultaneously in any other container. > That's not true, so it's a flawed (though very useful) analogy. It's so useful that we have an operator called "in", implemented using a magic method "__contains__", to test exactly that concept. As long as you understand that containment here really means something more like "is accessible from", it's correct. Flawed in a minor way, but so extremely convenient that it's not worth going for complete technical correctness. ChrisA