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
Post a Comment