Python: will id() always be nonzero? -


i’m wondering if there python object ids prevent them ever equaling zero? i’m asking because i’m using 0 stand-in special case in code.

from docs

cpython implementation detail: address of object in memory.

0 invalid memory location. no object in c ever have memory location , no object in cpython implementation ever have id of zero.

not sure other python implementations though


Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -