lyst[:None]

Tim Peters tim.one at comcast.net
Fri May 23 10:43:28 EDT 2003


[Steve Holden]
> I'm not even sure whether a list *can* have more than sys.maxint
> elements - I'm sure that will give us something to talk about for
> days!

I'll cut it mercifully short, then <wink>:  sys.maxint is the largest
positive platform C long, and containers in Python can't have more elements
than the largest positive platform C int.  On a 32-bit box, you can't even
get close to the latter (let alone the former), since at least 4*len(list)
bytes are needed just to store pointers to list's elements -- you run out of
address space.

On 64-bit boxes we'll *eventually* regret that the # of container elements
is limited to the largest positive C int, but I don't believe that's popped
up in real life yet.






More information about the Python-list mailing list