Message17855
Logged In: YES
user_id=539787
I tried this:
def f((a,b), c, (d,e)): pass
and f.func_code.co_varnames is
('.0', 'c', '.4', 'a', 'b', 'd', 'e')
That means .0 and .4 are dummy placeholders for the
argument tuples. I couldn't find a direct way to know the
length of each tuple, though --unless one analyzes the first
UNPACK_SEQUENCE bytecodes of fob.func_code.co_code,
and then uses the tuple fob.func_code.co_varnames
[fob.func_code.co_argcount:] to recreate the tuples; should
we get into this trouble, or just do a regular expression
replace a la:
argText = "(%s)" % re.sub("\.\d+", "<tuple>", argText)
at line 144? |
|
Date |
User |
Action |
Args |
2007-08-23 14:16:14 | admin | link | issue791968 messages |
2007-08-23 14:16:14 | admin | create | |
|