4 ms·
This does play a role if for some reason you use object IDs, e.g. when deserializing data with cross-links. Keeping a real second reference becomes important.
by nine_k 6y ago
This does play a role if for some reason you use object IDs, e.g. when deserializing data with cross-links. Keeping a real second reference becomes important.
- deleted 6y ago[deleted]
- wizzwizz4 6y agoYou should never use object IDs that way; that's what weak references / dictionaries are for. (See pickle for details.)
- heavenlyblue 6y agoPython docs explicitly say that object IDs are only unique for objects with overlapping lifetimes. Congrats, by trying to be smart you just shot yourself in the foot.