This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tzot
Recipients
Date 2003-08-20.16:02:24
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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?
History
Date User Action Args
2007-08-23 14:16:14adminlinkissue791968 messages
2007-08-23 14:16:14admincreate