[PYTHON MATRIX-SIG] Some notes on the matrix class

Guido van Rossum guido@CNRI.Reston.VA.US
Wed, 01 Nov 1995 14:09:26 -0500


> d. One curiosity is the notation something[(a,b,c)]. This is required
>    because something[a,b,c] is a syntax error. But perhaps Python could
>    allow the latter interpreted as the former. For if you do x=[1.,2.,3.]
>    then trying x[(0,1,2)] produces a perfectly sensible error message.
>    And it would be in the spirit of tuples not always needing the parentheses.
>    (That sound you hear is the shot of a large caliber weapon as Guido 
>    justifiably shoots a newbie for making a suggested language change before
>    he can even use half the language yet; in fact, I'm tempted to shoot 
>    myself, but I'm enjoying Python too much to die yet.)

Am I known to shoot newbies?  Only in my dreams :-)

This is actually a very reasonable request that has come up in this
context before.  It's a tad complicated to implement because there
some interference with the syntax for x[i:j], but should be possible.
If someone could contribute patches I'd be willing to review them and
add them to the next release; otherwise it may happen slower.  I
expect that changes are needed only to Grammar and compile.c...

--Guido van Rossum <guido@CNRI.Reston.VA.US>
URL: <http://www.python.org/~guido/>

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

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