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.

Title: IDLE: One corner calltip case
Type: behavior Stage: resolved
Components: IDLE Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: kbk, python-dev, roger.serwy, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2014-06-04 12:50 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
calltips_starred_names.patch serhiy.storchaka, 2014-06-09 19:01 review
Messages (5)
msg219755 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-06-04 12:50
def f(args, kwds, *args1, **kwargs): pass

Then calltip for "f(" shows invalid signature "(args, kwds, *args, **kwds)".
msg219772 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-04 21:00
Unless you feel like struggling with the 2.7's custom calltip calculation code for possibly little or no gain, please close this as wont' fix. See #20122, especially msg208454 and point 3. f6f2d9d04cd0 made this change to improve the calltip for *x and **y from always completely wrong to usually right:
-                items.append("...")
+                items.append("*args")
             if fob.func_code.co_flags & 0x8:
-                items.append("***")
+                items.append("**kwds")

This issue was fixed in 3.x, which does not have old-style classes to contend with.
msg220108 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-06-09 19:01
Here is a patch. Now names of starred arguments never conflict with other parameters.
msg220114 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-09 20:00
Looks good on reading. When I get my repository copy repaired, I will test and either apply or report back. In 2.7 Lib/*.py, 9 module use 'kwds' and 28 use 'kwargs', so I will accept that change.
msg220129 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-10 00:02
New changeset 0b181c02df7c by Terry Jan Reedy in branch '2.7':
Closes Issue 21659: Improve Idle calltips for *args, **kwargs in 2.7, where actual
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65858
2014-06-10 00:02:39python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg220129

resolution: fixed
stage: commit review -> resolved
2014-06-09 20:00:37terry.reedysetassignee: terry.reedy
messages: + msg220114
stage: patch review -> commit review
2014-06-09 19:01:33serhiy.storchakasetfiles: + calltips_starred_names.patch
keywords: + patch
messages: + msg220108

stage: patch review
2014-06-04 21:00:59terry.reedysetmessages: + msg219772
2014-06-04 12:50:23serhiy.storchakacreate