[PYTHON MATRIX-SIG] Yorick, Python and Array.py

James Hugunin jjh@mama-bear.lcs.mit.edu
Sat, 11 Nov 95 12:17:10 -0500


I almost completely agree with your comments (now that I think I better  
understand what you're talking about).  Here is how I see things.  Please  
shout out if there are any major errors.

I'm creating special objects All, Empty, Star, and Dot in order to capture  
the capabilities of Yorick for array subscripting.

I've created a slice object to generalize the notion of start:stop:step indexing.

Right now, my indexing system can take any combination of arbitrary  
sequences of ints, slices, or single ints as a full product form index into  
the matrix.

The principle problems with this system are potential naming conflicts (or  
really ugly names like Matrix.Star) and the ugliness of Slice(None,None,2)  
vs. ::2.

You are working on an extension to the python grammar to remove the extra  
brackets, make ::2 <--> some builtin python slice object, and "-" equivalent  
to some builtin python pseudo index object.  I'd love to see all of these  
things happen, and I think that they'd fit in perfectly with my existing  
matrix object.

I'm curious as to how you're implementing your slices.  Are you creating a  
new python C object?  This is actually the next step for me with my matrix  
object, and I'd love to see what you've done so far so that I can try and  
keep my work compatible with yours (and not duplicate too much effort).

-Jim

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================