On 6/18/07, filox <[EMAIL PROTECTED]> 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?
mxTools includes a sizeof() function. Never used it myself, but MAL
isn't notorious for getting things wrong, so I'm sure it does what i
En Mon, 18 Jun 2007 16:48:36 -0300, filox <[EMAIL PROTECTED]>
escribió:
> "Brett Hoerner" <[EMAIL PROTECTED]> wrote in message
>> Although I have the feeling you mean "how many bytes does this object
>> take in memory" - and I believe the short answer is no.
>
> is there a long answer? what i wa
On Jun 19, 9:00 am, 7stud <[EMAIL PROTECTED]> wrote:
> On Jun 18, 10:07 am, "filox" <[EMAIL PROTECTED]> 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?
>
> > --
> > You're never too young to have a Vietnam flashback
>
On Jun 18, 10:07 am, "filox" <[EMAIL PROTECTED]> 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?
>
> --
> You're never too young to have a Vietnam flashback
You can use the struct module to find the size in bytes:
imp
filox wrote:
> "Brett Hoerner" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> On Jun 18, 11:07 am, "filox" <[EMAIL PROTECTED]> 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
On Jun 18, 2:48 pm, "filox" <[EMAIL PROTECTED]> wrote:
> is there a long answer? what i want is to find out the number of bytes the
> object takes up in memory (during runtime). since python has a lot of
> introspection mechanisms i thought that should be no problem...
There isn't an automatic way
"Brett Hoerner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Jun 18, 11:07 am, "filox" <[EMAIL PROTECTED]> 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,
>
>
On Jun 18, 11:07 am, "filox" <[EMAIL PROTECTED]> 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
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?
--
You're never too young to have a Vietnam flashback
--
http://mail.python.org/mailman/listinfo/python-list