]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Append "..." if the appropriate flag (for varargs) in co_flags is set.
authorGuido van Rossum <guido@python.org>
Wed, 9 Jun 1999 20:34:57 +0000 (20:34 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 9 Jun 1999 20:34:57 +0000 (20:34 +0000)
Ditto "***" for kwargs.

Tools/idle/CallTips.py

index 0bdeb92adf28cee1827ce3ce23d417b6952ae910..e54483b90a349400a6516299f3c7a0459eeac009 100644 (file)
@@ -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: