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

James Hugunin jjh@mama-bear.lcs.mit.edu
Fri, 10 Nov 95 17:33:52 -0500


> The advantages of Yorick can be added to Python but it requires some
> major work on some internals.  In a reply to one of my previous posts,
> Guido already said he doesn't mind someone submitting internal changes
> that keep the language backward compatible.

I'm not sure that this is true.  I've found that for my matrix object (on  
which I have received almost entirely good reviews from the testers) that  
this sort of indexing can be added very easily to python using mapping  
semantics (as Dave mentioned):

ie. a[[All,Empty,All]] <--> a(,-,)

I do think that it would be nice to remove that extra set of brackets,  
which Guido is also in favor of; however, I'm just not convinced that any  
further modifications are needed.

For your other examples:

a[[Star,2,3]] <--> a(*,2,3)

a[[Slice(1,10,2)]] <--> a(1:10:2)

I realize that the syntax in Yorick is a little bit more consise, but I'm  
just not convinced that such fundamental changes to the python core are in  
fact necessary.

Just my two cents worth,
Jim

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

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