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

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top