Raymond, Thanks for your answers, which even covered the question that I didn't ask but should have.
<code> "A Python list is not an array()\n" * 100 </code> :) Jeff "Raymond Hettinger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [Jeff Melvaine] >> I note that I can write expressions like "1 << 100" and the result is >> stored >> as a long integer, which means it is stored as an integer of arbitrary >> length. I may need to use a large number of these, and am interested to >> know whether the storage efficiency of long integers is in danger of >> breaking my code if I use too many. Would I do better to write a class >> that >> defines bitwise operations on arrays of integers, each integer being >> assumed >> to contain at most 32 bits? > > > Both array() objects and long integers are equally space efficient. > In contrast, a list of integers takes up a lot of space (the list is > stored as an array of pointers to individual integer objects). > > Raymond > -- http://mail.python.org/mailman/listinfo/python-list