is id(self) constant over an object lifetime ?

  • Thread starter Jean-Michel Pichavant
  • Start date
J

Jean-Michel Pichavant

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,000
Messages
2,570,252
Members
46,848
Latest member
CristineKo

Latest Threads

Top