Re: Rats! vararg assignments don't work
- From: aleax@xxxxxxx (Alex Martelli)
- Date: Wed, 30 May 2007 08:05:43 -0700
samwyse <dejanews@xxxxxxxxx> wrote:
...
Actually, I'm surprised that the PEP does as much as it does. If tuples
are implemented as S-expressions, then something like this:
Tuples are implemented as compact arrays of pointer-to-PyObject (so are
lists, BTW). So, for example, a 10-items tuple takes 40 bytes (plus a
small overhead for the header) on a 32-bit build, not 80 as it would if
implemented as a linked list of (pointer-to-object, pointer-to-next)
pairs; addressing sometuple[N] is O(1), NOT O(N); etc, etc.
Alex
.
- References:
- Rats! vararg assignments don't work
- From: samwyse
- Re: Rats! vararg assignments don't work
- From: Matimus
- Re: Rats! vararg assignments don't work
- From: George Sakkis
- Re: Rats! vararg assignments don't work
- From: samwyse
- Rats! vararg assignments don't work
- Prev by Date: Re: How to print this character u'\u20ac' to DOS terminal
- Next by Date: Re: How to print this character u'\u20ac' to DOS terminal
- Previous by thread: Re: Rats! vararg assignments don't work
- Next by thread: Re: Rats! vararg assignments don't work
- Index(es):
Relevant Pages
|