Re: Possible PEP - two dimensional arrays?

2016-06-08 Thread Michael Torrie
On 06/07/2016 06:17 PM, Harrison Chudleigh wrote: > I was programming a computer game and found that while 1D arrays can be > created using the module array, there is no module for two-dimensional > arrays, unlike languages like C. Currently, the closest thing Python has to > a 2D array is a

Re: Possible PEP - two dimensional arrays?

2016-06-08 Thread Terry Reedy
On 6/7/2016 8:17 PM, Harrison Chudleigh wrote: I was programming a computer game and found that while 1D arrays can be created using the module array, there is no module for two-dimensional arrays, unlike languages like C. Currently, the closest thing Python has to a 2D array is a dictionary

Re: Possible PEP - two dimensional arrays?

2016-06-07 Thread Rob Gaddi
Harrison Chudleigh wrote: > I was programming a computer game and found that while 1D arrays can be > created using the module array, there is no module for two-dimensional > arrays, unlike languages like C. Currently, the closest thing Python has to > a 2D array is a dictionary containing lists.

Re: Possible PEP - two dimensional arrays?

2016-06-07 Thread Ned Batchelder
On Tuesday, June 7, 2016 at 8:19:33 PM UTC-4, Harrison Chudleigh wrote: > I was programming a computer game and found that while 1D arrays can be > created using the module array, there is no module for two-dimensional > arrays, unlike languages like C. Currently, the closest thing Python has to >

Re: Possible PEP - two dimensional arrays?

2016-06-07 Thread Paul Rubin
Harrison Chudleigh writes: > Currently, the closest thing Python has to a 2D array is a dictionary > containing lists. Tuples work fine: d = {} d[2,3] = 5 # etc... > Is this idea PEPable? I don't think it would get any traction. If you're doing

Possible PEP - two dimensional arrays?

2016-06-07 Thread Harrison Chudleigh
I was programming a computer game and found that while 1D arrays can be created using the module array, there is no module for two-dimensional arrays, unlike languages like C. Currently, the closest thing Python has to a 2D array is a dictionary containing lists. I propose that a module ,