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

Hinsen Konrad hinsenk@ere.umontreal.ca
Sun, 12 Nov 1995 13:47:31 -0500


   implementations.  I'm trying to implement some of the more interesting ideas  
   in the hopes of myself and others being able to play with them, not as an  
   attempt to impose a standard!

Fine, but there is always the danger that the first working implementation
sets a de-facto standard. That's how we got "industry standards" like
DOS, Windows, or the IBM PC architecture.

Maybe it would be a good idea to use very complicated names for things
that are just experimental. That way noone would want to keep them ;-)

   Gee Konrad, I thought you had been playing with my matrices.  I already  

Not as much as I would like...

   easier.  One thing that I really like about slices is that you can leave off  
   the start or end points, and have them assigned appropriately for the array  
   (just as in normal python slice indexing).  This is a LOT easier to use  
   than range.

True. So how about allowing three-argument slices? Fixing the parser
is easy; implementing the feature for other sequence types is probably
some more work, but feasible. There is one semantic problem, which
also exists for your Slice() objects: how is assignment to such
generalized slices defined if the number of elements in the new-value
object doesn't match the number of elements in the slice? Assigning to
"traditional" slices simply changes the length of a sequence. Of
course there is always the possibility of raising an error, but maybe
there is some useful interpretation of this.

-------------------------------------------------------------------------------
Konrad Hinsen                     | E-Mail: hinsenk@ere.umontreal.ca
Departement de chimie             | Tel.: +1-514-343-6111 ext. 3953
Universite de Montreal            | Fax:  +1-514-343-7586
C.P. 6128, succ. Centre-Ville     | Deutsch/Esperanto/English/Nederlands/
Montreal (QC) H3C 3J7             | Francais (phase experimentale)
-------------------------------------------------------------------------------

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

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