[Wisp-cvs] wisp/users/dig tran.py,1.105,1.106
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-17 15:29:53
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv22487 Modified Files: tran.py Log Message: implemented Register.ancestry Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- tran.py 17 May 2003 14:46:34 -0000 1.105 +++ tran.py 17 May 2003 15:29:50 -0000 1.106 @@ -154,6 +154,8 @@ def parent (this): if len(this): return Register(this[:-1], this.names) else: return None + def ancestry (this): + return [this[:i] for i in range(len(this) - 1, -1, -1)] def next (this): l = list(this) l[-1] += 1 @@ -352,7 +354,6 @@ from getopt import getopt import elf import pe - import string import sys default_output_names = {'elf': 'a.out', 'pe': 'untitled.exe'} |