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


Groups > comp.lang.python > #97211

Re: Question re class variable

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: Question re class variable
Date 2015-09-29 14:44 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <mue84o$l3l$1@reader1.panix.com> (permalink)
References <3948d9cd-24b1-4a3b-8ed0-46bb60a8d738@googlegroups.com> <mudnfg$cqo$1@speranza.aioe.org>

Show all headers | View raw


In <mudnfg$cqo$1@speranza.aioe.org> alister <alister.nospam.ware@ntlworld.com> writes:

> why not simply use pythons builtin id function?
> each new instance of an object is automatically assigned a unique ID

It's only guaranteed to be unique for objects that exist at the same time.

If an object is created and destroyed and then another new object is
created, the ID of those two objects can be the same.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

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


Thread

Question re class variable plewto@gmail.com - 2015-09-29 02:27 -0700
  Re: Question re class variable alister <alister.nospam.ware@ntlworld.com> - 2015-09-29 10:00 +0000
    Re: Question re class variable John Gordon <gordon@panix.com> - 2015-09-29 14:44 +0000
      Re: Question re class variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-29 20:41 -0400
  Re: Question re class variable Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-29 12:40 +0200
    Re: Question re class variable Anssi Saari <as@sci.fi> - 2015-09-29 14:17 +0300
      Re: Question re class variable Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-29 14:02 +0200
      Re: Question re class variable Steven D'Aprano <steve@pearwood.info> - 2015-09-29 22:06 +1000
      Re: Question re class variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-29 08:21 -0400
  Re: Question re class variable jmp <jeanmichel@sequans.com> - 2015-09-29 13:02 +0200
  Re: Question re class variable jmp <jeanmichel@sequans.com> - 2015-09-29 13:11 +0200

csiph-web