> the string type uses the ob_size field to hold the string length, and > ob_size is an integer: > > $ more Include/object.h > ... > int ob_size; /* Number of items in variable part */
If this is what you mean, #define PyObject_VAR_HEAD \ PyObject_HEAD \ int ob_size; /* Number of items in variable part */ and if I understand it the proper way (i.e. that all Python types are derived from Python objects) also the unlimited size integers are limited to integers which fit into 2 GByte memory, right? And also a list or dictionary are not designed to have more than 2 Giga of elements, etc. So the question which still remains open is, can Python by design handle adress space larger than 2 GByte? I can't check it out myself beeing on a Windows system which limits already a single process to this address space. With lists I hit the memory limit at around: python -c "print len(280*1024*1024*[None])" (where the required memory for this list is larger or equal around 1.15 GByte - on Windows 2000, Pentium4, with 3GByte RAM and Python 2.4.2). Claudio -- http://mail.python.org/mailman/listinfo/python-list