Get object by id()

0 votes
If I have an id of a Python object, which I retrieved by doing id(thing) then how do I find thing again by the id number I was given?
Feb 20, 2019 in Python by ana1504.k
• 7,890 points
35 views

1 answer to this question.

0 votes
You'll probably want to consider implementing it another way such as the weakref module?

 The Python weakref module lets you keep references, dictionary references, and proxies to objects without having those references count in the reference counter. They're like symbolic links.
answered Feb 20, 2019 by SDeb
• 13,230 points

Related Questions In Python

0 votes
1 answer

How to get a Mongoengine's object id in a flask program

Check out the documentation, Document.objects is a QuerySet object. You seem to be ...READ MORE

answered Sep 21, 2018 in Python by charlie_brown
• 7,760 points
149 views
0 votes
1 answer

how to get mongoengine object id in flask program

Check out the documentation, Document.objects is a QuerySet object. You seem to be ...READ MORE

answered Oct 5, 2018 in Python by Priyaj
• 57,530 points
1,780 views
0 votes
1 answer

how to get mongoengine object id in flask program

Check out the documentation, Document.objects is a QuerySet object. You seem to be ...READ MORE

answered Oct 10, 2018 in Python by Priyaj
• 57,530 points
90 views
0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 745 views
0 votes
0 answers
0 votes
1 answer

Get key by value in dictionary

The problem here is you cannot use ...READ MORE

answered Jul 1, 2019 in Python by SDeb
• 13,230 points
48 views
0 votes
1 answer

Get the Current time in Python

To get the current date and time ...READ MORE

answered Oct 3, 2018 in Python by SDeb
• 13,230 points
72 views