[PYTHON MATRIX-SIG] Slice expressions
tim@lassi.ece.uiuc.edu
tim@lassi.ece.uiuc.edu
Thu, 17 Oct 1996 13:15:20 -0500
Or better yet (for aethetic reasons...), replace the 1 with None:
class Index_expression_class:
....
def __getslice__(self, start, stop):
if stop == self.maxint:
stop = None
return self[start:stop:None]
--
-tim
+--------------------------------------------------------------------+
| Tim Hochberg Ultrahigh Speed Digital Electronics Lab |
| tim@lassi.ece.uiuc.edu University of Illinois |
| http://dogbert.ece.uiuc.edu/~tim (217) 333-6014 |
+--------------------------------------------------------------------+
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================