is id(self) constant over an object lifetime ?

Discussion in 'Python' started by Jean-Michel Pichavant, Dec 3, 2010.

  1. Hello fellows,

    I would need a unique internal identifier to an object. Can I use the
    object python id ?

    class Foo:
    def getUniqueIdentifier():
    return id(self)


    This id needs to be unique and constant over the python process lifetime.

    JM
     
    Jean-Michel Pichavant, Dec 3, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ralf W. Grosse-Kunstleve
    Replies:
    16
    Views:
    589
    Lonnie Princehouse
    Jul 11, 2005
  2. Ralf W. Grosse-Kunstleve
    Replies:
    18
    Views:
    601
    Bengt Richter
    Jul 11, 2005
  3. Ralf W. Grosse-Kunstleve
    Replies:
    2
    Views:
    406
    Dan Sommers
    Jul 12, 2005
  4. falcon
    Replies:
    0
    Views:
    379
    falcon
    Jul 31, 2005
  5. Bart Kastermans
    Replies:
    6
    Views:
    407
    Bart Kastermans
    Jul 13, 2008
Loading...

Share This Page