[PYTHON MATRIX-SIG] lists vs. tuples

David Ascher da@maigret.cog.brown.edu
Thu, 1 Feb 1996 19:40:45 -0500 (EST)


Just a thought.

I believe that most existing python code, when returning collections,
return tuples.

The matrix code as implemented returns lists (e.g. shape).  Shape
strikes me as the kind of thing which might be better off being a tuple
than a list.  That way people doing:

 a = array(...)
 s = a.shape()
 s[0] = 3

would be stopped by the interpreter (I'm assuming this isn't working and
isn't likely to work).

Thoughts?

--david


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

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