lists as an efficient implementation of large two-dimensional arrays(!)

2010-02-02 Thread Mitchell L Model
An instructive lesson in YAGNI (you aren't going to need it), premature optimization, and not making assumptions about Python data structure implementations. I need a 1000 x 1000 two-dimensional array of objects. (Since they are instances of application classes it appears that the array

Re: lists as an efficient implementation of large two-dimensional arrays(!)

2010-02-02 Thread Gerald Britton
Did you try it with an array object using the array module? On Tue, Feb 2, 2010 at 3:14 PM, Mitchell L Model mlm...@comcast.net wrote: An instructive lesson in YAGNI (you aren't going to need it), premature optimization, and not making assumptions about Python data structure implementations.

Re: lists as an efficient implementation of large two-dimensional arrays(!)

2010-02-02 Thread exarkun
On 08:36 pm, gerald.brit...@gmail.com wrote: On Tue, Feb 2, 2010 at 3:14 PM, Mitchell L Model mlm...@comcast.net wrote: I need a 1000 x 1000 two-dimensional array of objects. (Since they are instances of application classes it appears that the array module is useless; Did you try it with an

Re: lists as an efficient implementation of large two-dimensional arrays(!)

2010-02-02 Thread Terry Reedy
On 2/2/2010 3:14 PM, Mitchell L Model wrote: I need a 1000 x 1000 two-dimensional array of objects. I would just use 1000 element list, with each element being a 1000 element list or array (if possible). Then l2d[i][j] works fine. -- http://mail.python.org/mailman/listinfo/python-list