Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv11799
Modified Files:
tran.py
Log Message:
wrote Register.next and Register.child
Index: tran.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- tran.py 17 May 2003 08:34:21 -0000 1.84
+++ tran.py 17 May 2003 08:37:23 -0000 1.85
@@ -158,6 +158,12 @@
def parent (this):
if len(this): return apply(Register, this[:-1])
else: return None
+ def next (this):
+ l = list(this)
+ l[-1] += 1
+ return apply(Register, this)
+ def child (this, index = 0):
+ return apply(Register, this + (index,))
def __repr__ (this):
return 'Register' + tuple.__repr__(this)
def __str__ (this):
|