diff options
author | Guido van Rossum <guido@python.org> | 1999-06-09 20:34:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-06-09 20:34:57 (GMT) |
commit | 2073177e0121f38895cd7e13c327850978833728 (patch) | |
tree | 9f1f2e585bc6f716c2d583fd6a00fa0ed5d76bbf | |
parent | d9e5d17407f21e25b5540efe77c891537763816e (diff) | |
download | cpython-2073177e0121f38895cd7e13c327850978833728.zip cpython-2073177e0121f38895cd7e13c327850978833728.tar.gz cpython-2073177e0121f38895cd7e13c327850978833728.tar.bz2 |
Append "..." if the appropriate flag (for varargs) in co_flags is set.
Ditto "***" for kwargs.
-rw-r--r-- | Tools/idle/CallTips.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/idle/CallTips.py b/Tools/idle/CallTips.py index 0bdeb92..e54483b 100644 --- a/Tools/idle/CallTips.py +++ b/Tools/idle/CallTips.py @@ -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: |