Counting bytes

Hugo Martires hmartires at cultalg.pt
Mon Feb 25 09:29:38 EST 2002


Where are the method's ?? (array.tostring() array.fromstring() )
I import the array module, but i don't have them.
I'm using python 1.5

"Martin von Loewis" <loewis at informatik.hu-berlin.de> wrote in message
news:j4bsedlnai.fsf at informatik.hu-berlin.de...
> "Hugo Martires" <hmartires at cultalg.pt> writes:
>
> > How can i count the number of bytes of:
> > --> List []
> > --> array('d',[])
> >
> > There is any function that return's the number of bytes ?
>
> For the list, no. For the array: len(arr.tostring()) will give a rough
> estimate. The actual memory consumption is higher, due to Python and
> malloc overheads.
>
> Regards,
> Martin
>
>





More information about the Python-list mailing list