Nick Coghlan wrote:
> Given the size of the counter, is it actually physically possible for a list
> to run out of room
> before the application runs out memory?
depends on the system architecture, of course: consider an 64-bit computer
with 32-bit integers and 256 GB of memory...
--
htt
Raymond Hettinger wrote:
How many items can be stored in a Python list? I have close to 70,000
items... is this within a lists limits?
Lists store pointers to objects. Unless you have a lot of duplicates, it is the
objects themselves that will consume most of your memory. The list itself will
li
> How many items can be stored in a Python list? I have close to 70,000
> items... is this within a lists limits?
Lists store pointers to objects. Unless you have a lot of duplicates, it is the
objects themselves that will consume most of your memory. The list itself will
likely be small in comp
I'm referring to Python 2.2's C headers as I answer this question. I
believe some of may have changed by 2.4.
The number of elements in a "variable-sized object" (those with
Py_VAR_HEAD; I believe this includes lists, tuples, and strings) is
stored in a platform 'int'.
On most (desktop) systems,
It is possible to store 70,000 items in a list (try "l =
range(7)"), but the best way to check if you can store all the
items you need to store is to try it. After all if they are all very
large you might potentially run out of memory.
Chris
--
http://mail.python.org/mailman/listinfo/python-
How many items can be stored in a Python list? I have close to 70,000
items... is this within a lists limits?
--
http://mail.python.org/mailman/listinfo/python-list