[Tutor] object size in python is in what units?

Steven D'Aprano steve at pearwood.info
Tue Jul 23 16:19:39 CEST 2013


On 23/07/13 18:19, Marc Tompkins wrote:

> A couple of clarifications I wish I'd made before hitting Send:  I
> shouldn't have said that IDs are "derived" or "calculated"; they're
> "assigned", presumably on a first-come, first-served basis;

Actually, in CPython they are derived, from the memory location, which annoys me no end :-)

But in Jython and IronPython they are assigned, when and as requested.

Some day, I'll invent my own version of Python, and make object IDs be consecutive prime numbers. That'll teach people to rely on them.

:-)


-- 
Steven


More information about the Tutor mailing list