data size

harry hartanto at telusplanet.net
Fri Nov 9 13:50:54 EST 2001


"Martin von Loewis" <loewis at informatik.hu-berlin.de> wrote in message
news:j4k7x084sy.fsf at informatik.hu-berlin.de...

> This is invalid syntax, I'll assume that you meant
>
> {"key1":[1,2,3,4], "key2": "hello", "key3": [1,2,3]}
>
> Notice that dict is now a collection of 11 objects:
> - four strings
> - four integers: 1,2,3,4
> - two lists: [1,2,3,4] and [1,2,3]
> - one dictionary
>
> You may think that the integers should be counted twice, but you
> actually have the same integer objects in each list.
>
> Do you want the siye of just the dictionary, or of all the objects
> together? What Python version? What operating system/microprocessor?
> What C library (to account for the overhead of malloc/free).

I would like to know the size of all objects together (the dictionary and
the contents). I am using Python 2.0 on Windows98 SE.
And I don't think I use any C library. (or you're refering to something that
i'm not aware of using)

Thanks!





More information about the Python-list mailing list