[MATRIX-SIG] reverse of take?
Konrad Hinsen
hinsen@ibs.ibs.fr
Wed, 2 Jul 1997 20:01:59 +0200
> Me too. I think a better approach to adding flavors/bells/whistles to
> indexing is by adding a default argument to the index, as in
>
> a[i, j, k, hint=flavor_woo_woo_17]
That's unfortunately impossible with the current Python syntax. An index
expression must consist of standard expressions or slices separated by
commas. No keyword arguments.
Aaron's comment on this:
> > a[i, j, k, hint=flavor_woo_woo_17]
>
> I'm reeling about not following this discussion, but I suspect
> the best approach is for Jim H. to "just do it". I personally
> begin to think that excess overloading of indexing is not
> advisable, possibly confusing. I vote for "take()" as is with dual
Until now we haven't discussed much more overloading - just the
addition of sequence types (including arrays) as indices! And I think
this kind of operation should be a form of indexing simply because
people coming from other array languages *expect* it to be.
--
-------------------------------------------------------------------------------
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
_______________