[MATRIX-SIG] UserArray.py problems

Janko Hauser jhauser@ifm.uni-kiel.de
Fri, 13 Mar 1998 20:27:53 +0100 (CET)

There is a better (more consistent) version at the starship site of
Timothy Hochberg and also another class which use UserArray. 

But be warned, that the class in its current intention is not really
generally appliciable, because functions need to now that they are
dealing with a userarray, if they should return a userarray. For me
it is questionable, if a function should return a userarray. If
something should look to the outside as an array, why should the
result be something else. Timothy tries to solve this with
shadowclasses. But one ends with a mixture of functions which return
an userarray and some which not. In the mentioned UserList and
UserDict, there are only very special methods, which return a
UserDict, and most handling with dicts and lists is done with
methods. This is not the case in NumPy.

So, I think the list should decide, if a ``replicating'' UserArray is
needed, than the UserArray class together with the shadow classes of
Timothy should be incorporated in the distribution, or a  simpler
one which returns an array normaly (not in the case of slicing or


MATRIX-SIG  - SIG on Matrix Math for Python

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