Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread Armin Rigo
Hi René, On Tue, Dec 21, 2010 at 1:24 PM, René Dudfield wrote: > sys.getsizeof(obj) Ah, thank you, didn't know about it. It's a 2.6 feature only though. A bientôt, Armin. ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread René Dudfield
sys.getsizeof(obj) ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread Armin Rigo
Hi, On Tue, Dec 21, 2010 at 9:58 AM, Arnd Rechenburg wrote: > In my code I need something like > > long.__itemsize__ > > in Python. I suppose the question is "why"? This is supposed to be the size in bytes occupied by one "element" of the type, and one element of "long" happens to be 15 bits, s

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread Maciej Fijalkowski
On Tue, Dec 21, 2010 at 1:31 PM, Antonio Cuni wrote: > On 21/12/10 12:05, Maciej Fijalkowski wrote: > >>> __itemsize__ - in bytes, corresponds to item size field in the types >>> definition structure. >>> >>> It's a field for types. >>> See: >>>    http://docs.python.org/c-api/typeobj.html#tp_item

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread Antonio Cuni
On 21/12/10 12:05, Maciej Fijalkowski wrote: >> __itemsize__ - in bytes, corresponds to item size field in the types >> definition structure. >> >> It's a field for types. >> See: >>http://docs.python.org/c-api/typeobj.html#tp_itemsize >> > > Well... Those are docs for C API. It doesn't say i

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread Maciej Fijalkowski
On Tue, Dec 21, 2010 at 1:02 PM, René Dudfield wrote: > Hi, > > __itemsize__ - in bytes, corresponds to item size field in the types > definition structure. > > It's a field for types. > See: >    http://docs.python.org/c-api/typeobj.html#tp_itemsize > Well... Those are docs for C API. It doesn't

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread René Dudfield
Hi, __itemsize__ - in bytes, corresponds to item size field in the types definition structure. It's a field for types. See: http://docs.python.org/c-api/typeobj.html#tp_itemsize On Tue, Dec 21, 2010 at 9:36 AM, Maciej Fijalkowski wrote: > > On Tue, Dec 21, 2010 at 10:58 AM, Arnd Rechenbur

Re: [pypy-dev] long.__itemsize__

2010-12-21 Thread Maciej Fijalkowski
On Tue, Dec 21, 2010 at 10:58 AM, Arnd Rechenburg wrote: > Hi, > > > > In my code I need something like > > long.__itemsize__ > > in Python. > > > > Any suggestions to do it with pypy? > Hey. This attribute is undocumented and untested as far as I can tell. What does it do? Cheers, fijal > >

[pypy-dev] long.__itemsize__

2010-12-21 Thread Arnd Rechenburg
Hi, In my code I need something like long.__itemsize__ in Python. Any suggestions to do it with pypy? Regards, Arnd ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev