Counting bytes

Hugo Martires hmartires at cultalg.pt
Mon Feb 25 16:32:10 CET 2002


Sory...
I found it ;)
These are object methods.
Problem solved.


"Hugo Martires" <hmartires at cultalg.pt> wrote in message
news:vRre8.603$9l1.7321620 at newsserver.ip.pt...
> 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