Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.036 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'builtin': 0.07; 'classes.': 0.07; 'received:mail-lpp01m010-f46.google.com': 0.09; 'sep': 0.09; 'wrote:': 0.17; 'thanks,': 0.18; 'header:In-Reply- To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'objects': 0.29; 'received:209.85.215.46': 0.30; 'subject: ?': 0.30; 'true.': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'same.': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'subject:with': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'necessarily': 0.63; 'reverse': 0.65; 'guaranteed': 0.76 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=iWQfWacEAXG3qw7xeOTR/tcjofGJjjLNubd9ZkugbUU=; b=NZC8ktyXO+057vNZQObnIqITBwWcKJfCaQOFMK+9Eru49pfA601C47GKXGW9y6ISKu eAXGZnCcgNYV8mKUHEqXJ5ivTiQNiICgoHkwTFROUwpcjZBkFuVj3P4um3h9/6QUS8W3 /SrwCWpv/0o8URzDYFLZtGoDodlhmVMMQxRcqOs0Gbefz3SJyqCwsxnzNb5MpuYPJggW 0HoBNTbVqn3MBlGfSZl4uE2p1zxHUA28KUdnjRlcvt+Nf+yUJpgZBjfMwbedwK//BIPQ uh0uo/GPsYRnpkoMzXLE0A+DDUk3nxPQjUO9gCPcQSkKMlW2XoSik2tHV7G5ogt+iX1v RoAQ== MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 4 Sep 2012 23:40:33 -0700 Subject: Re: is implemented with id ? From: Benjamin Kaplan To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmBhBovucy3qrtP0Uh0ekQp/FXAApdu15dG2fPKz0yoL4KDqliQXwDJPFrHPCE0D2TNA5yd X-Junkmail-Whitelist: YES (by domain whitelist at mpv2.tis.cwru.edu) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346827305 news.xs4all.nl 6886 [2001:888:2000:d::a6]:43491 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28457 On Tue, Sep 4, 2012 at 11:30 PM, Franck Ditter wrote: > Hi ! > a is b <==> id(a) == id(b) in builtin classes. > Is that true ? > Thanks, > > franck No. It is true that if a is b then id(a) == id(b) but the reverse is not necessarily true. id is only guaranteed to be unique among objects alive at the same time. If objects are discarded, their ids may be reused even though the objects are not the same.