Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'immutable': 0.09; 'used)': 0.09; 'python': 0.11; 'subject:python': 0.14; 'interpreter': 0.15; '10:00': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:class': 0.16; 'subject:object': 0.16; 'subject:type': 0.16; 'wrote:': 0.16; 'versions': 0.20; 'am,': 0.23; 'seems': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'cases.': 0.29; 'objects': 0.29; 'says': 0.32; 'older': 0.32; 'message-id:@gmail.com': 0.35; 'to:addr:python- list': 0.35; 'should': 0.37; 'subject:: ': 0.37; 'optimization': 0.37; 'detail': 0.38; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'skip:u 10': 0.62; 'charset:windows-1252': 0.65 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Wed, 03 Jun 2015 10:36:49 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Everything is an object in python - object class and type class References: <14976c1b-a620-426f-b529-41a3c04e9c1a@googlegroups.com> <48fc36e9-fa67-45d5-9864-0921b7e819ce@googlegroups.com> <556d931a$0$12991$c3e8da3$5496439d@news.astraweb.com> <1ad44d0f-8a98-4302-9391-51264aa258e5@googlegroups.com> <87fv6956zw.fsf@elektro.pacujo.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433349421 news.xs4all.nl 2878 [2001:888:2000:d::a6]:50745 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3317 X-Received-Body-CRC: 3467468404 Xref: csiph.com comp.lang.python:91975 On 06/03/2015 10:00 AM, BartC wrote: > The others all give True in all cases. It seems that older Python > versions have a purer object model. No. It's just an under-the-hood optimization that the interpreter is making. It's an implementation detail that you should never rely on. It says nothing about the purity of the object model. Immutable objects can be optimized ("interred" is the word often used) by reusing the same object over and over when the interpreter can.