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 in Python by ana1504.k
• 7,870 points
18 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 by SDeb
• 13,160 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,720 points
55 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
• 56,520 points
793 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
• 56,520 points
54 views
+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 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 232 views
0 votes
1 answer

Get key by value in dictionary

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

answered Jul 1 in Python by SDeb
• 13,160 points
22 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,160 points
51 views