Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


You should never use object IDs that way; that's what weak references / dictionaries are for. (See pickle for details.)


Python 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: