Kaydet (Commit) 2073177e authored tarafından Guido van Rossum's avatar Guido van Rossum

Append "..." if the appropriate flag (for varargs) in co_flags is set.

Ditto "***" for kwargs.
üst d9e5d174
......@@ -111,8 +111,10 @@ def get_arg_text(ob):
defaults = list(map(lambda name: "=%s" % name, defaults))
defaults = [""] * (len(realArgs)-len(defaults)) + defaults
items = map(lambda arg, dflt: arg+dflt, realArgs, defaults)
if len(realArgs)+argOffset < (len(ob.func_code.co_varnames) - len(ob.func_code.co_names) ):
if ob.func_code.co_flags & 0x4:
items.append("...")
if ob.func_code.co_flags & 0x8:
items.append("***")
argText = string.join(items , ", ")
argText = "(%s)" % argText
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment