getting the size of an object

Brett Hoerner bretthoerner at bretthoerner.com
Mon Jun 18 12:08:52 EDT 2007


On Jun 18, 11:07 am, "filox" <filox_realmmakni... at yahoo.com> wrote:
> is there a way to find out the size of an object in Python? e.g., how could
> i get the size of a list or a tuple?

"Size" can mean a lot of things,

len(my_list)
len(my_tuple)

Although I have the feeling you mean "how many bytes does this object
take in memory" - and I believe the short answer is no.



Brett




More information about the Python-list mailing list