lyst[:None]

Michael Hudson mwh at python.net
Mon May 26 07:35:05 EDT 2003


Jacek Generowicz <jacek.generowicz at cern.ch> writes:

> Tim Peters <tim.one at comcast.net> writes:
> 
> > 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.
> 
> But won't sys.maxint be correspondingly bigger on 64-bit boxes ?

Yes.  Did you read what Tim said?  sys.maxint == LONG_MAX; max # of
elements in container == INT_MAX.  On 64-bit boxes these are usually
different (though not Win64 IIRC).

Cheers,
M.

-- 
  (ps: don't feed the lawyers: they just lose their fear of humans)
                                         -- Peter Wood, comp.lang.lisp




More information about the Python-list mailing list