sizeof?

M.-A. Lemburg mal at lemburg.com
Wed Oct 18 07:15:59 EDT 2000


Remco Gerlich wrote:
> 
> seung-won hwang <shwang5 at students.uiuc.edu> wrote in comp.lang.python:
> > Is there any operator to measure the size of the object in Python
> > something like sizeof in C? I couldn't find any from the book
> > and documents I have. Thanks!
> 
> There is no way to find the exact number of memory bytes an object uses.
> Consider that irrelevant.

Not quite true: have a look at sizeof() in mx.Tools (see my Python Pages).
 
> To find the length of a list, or a tuple, or other sequences, use len().
> 
> Remco Gerlich

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/




More information about the Python-list mailing list