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.

classification
Title: Idle: add doc subsection on calltips
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords:

Created on 2015-04-22 16:58 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg241815 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-04-22 16:57
The doc currently says, in the Edit menu section,

Show call tip
    After an unclosed parenthesis for a function, open a small window with function parameter hints.

I propose to add the additional information I gave in answer to https://stackoverflow.com/questions/29784273/python-idle-wont-show-docstring, in a subsubsection before or after the current one on completions https://docs.python.org/3/library/idle.html#completions  

'''
Calltips are shown when one types '(' after the name of an *acccessible* function.  The calltip should stay displayed until one types ')' or clicks the mouse or otherwise moves the cursor to dismiss it.  Cntl-\ brings it back.

A calltip consists of the function signature and the first line of the docstring.  For builtins without an accessible signature (such as, in 3.4.3, `int` or `bytes`), the calltip consists of all lines up the fifth line or the first blank line.

The set of *accessible* functions depends on what modules have been imported into the user process (where your code is executed), including those imported by Idle itself, and what code has been run (since the last restart).  For example, restart the Shell (Cntl-F6), open a new editor window, and enter

    itertools.count(

A calltip appears because Idle imports itertools into the user process for its own use.  Enter

    turtle.write(

and nothing appears, because the Idle does not import turtle.  Cntl-\ does nothing either.  Entering

    import turtle

above the function call does not immediately help, but if one runs the file to perform the import, calltips for turtle functions become available.

The suggests that one might want to run a file after writing the import statements at the top, or immediately run an existing file before editing.
'''
msg251822 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-09-29 05:57
New changeset 395d363e34e1 by Terry Jan Reedy in branch '2.7':
Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/395d363e34e1

New changeset 8103dadb9ef7 by Terry Jan Reedy in branch '3.4':
Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/8103dadb9ef7

New changeset 3481c466926a by Terry Jan Reedy in branch '3.5':
Merge with 3.4, Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/3481c466926a

New changeset e025bdffd71c by Terry Jan Reedy in branch 'default':
Merge with 3.5, Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/e025bdffd71c
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68216
2019-03-21 18:19:59terry.reedysetcomponents: + IDLE
2019-03-21 18:19:49terry.reedysetnosy: - python-dev
2015-09-29 05:58:07terry.reedysetstatus: open -> closed
stage: needs patch -> resolved
resolution: fixed
versions: + Python 3.6
2015-09-29 05:57:15python-devsetnosy: + python-dev
messages: + msg251822
2015-04-22 16:58:00terry.reedycreate