[MATRIX-SIG] A proposal (LONG) - "reverse of take" revisited

Konrad Hinsen hinsen@ibs.ibs.fr
Mon, 21 Jul 1997 12:50:10 +0200


> >3) generate an error.  This is the behavior of take() when the index is
> >out of bounds.
> 
> Good old APL style. This has the virtue that even if it isn't making you
> happy, it's easy to understand and expect. You could do worse.

Especially considering that
1) It is easy enough to do clipping etc. as an explicit separate step.
2) Python's exception handling means that an error is not an
   intractable problem.

So I vote for this solution. In fact, I can't say I am too happy about the
clipping behaviour for slices, but there was little choice given that
clipping is part of the general sequence protocol.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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