On 23/07/13 19:27, Jim Mooney wrote:

And yet I still get 36 with this:

bigKronk = Kronk('supercalifracilisticexpalidocious, even though the
sound of it is really quite atrocious')
sys.getsizeof(bigKronk)
36

So I guess the object is only pointing to its contents.

Python namespaces are effectively dictionaries binding a name
with an object reference. The object in turn is like a dictionary referring to the values. So I guess you are seeing the object
container size.

means an object is just a bunch of names bound to pointers.

Pretty much everything in Python looks like a dictionary
so I'd guess you are correct.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to