Maximum List size (item number) limit?

Steve Holden steve at holdenweb.com
Wed Jan 11 13:59:12 CET 2006


Kriston-Vizi Janos wrote:
> Dear Mr. Kern, and Members,
> 
> Thank you very much for the fast answer, my question became 
> over-simplified.
> 
> My source code is appended below. It uses two text files (L.txt and 
> GC.txt) as input and merges them. Please find these two files here:
> http://kristonvizi.hu/L.txt
> http://kristonvizi.hu/GC.txt
> 
> Both L.txt and GC.txt contains 3000 rows. When running, the code stops 
> with error message:
> 
> 'The debugged program raised the exception IndexError "list index out of 
> range"
> File: /home/kvjanos/file.py, Line: 91'
> 
This error does not indicate that you cannot add further items to a 
list. It indicates that you are trying to address a list item that 
hasn't yet been added.

It would have been more helpful to post the *whole* traceback. 
Furthermore, why  do you assume that a 999 is an implementation limit on 
the basis of this search result:

>> What is the maximum listsize in python? In characters
>> or items. Thnx.
> 
> 2147483647 items, on most platforms.  if you have enough
> memory, that is.

Does 2147483647 look similar enough to 999 to be confusing?

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list