Python IDLE won't show docstring

My IDLE (Python 3.4.3) will not render functions doc strings when entering function name.

Anyone familiar with this problem?

I've tried everything including deleting etc. The answers were not found anywhere on the Internet.

I'm talking about showing doxters automatically, NOT when I specifically type:

print(func. __ doc __) 




source to share

1 answer

Docks are part of callTip, not completion. Calls are displayed when one type is one ("after the name of the available function". CallTip must remain displayed until type is selected ")" or click or otherwise move the cursor to dismiss it. Cntl- \ returns it.

The call consists of the function signature and the first docstring. For inline functions without an available signature (for example, in 3.4.3, int

or bytes

), callTip consists of all lines up the fifth line, or the first blank line.

The set of functions available depends on which modules were imported into the user process (where your code is running), 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 type



A prompt appears because Idle is importing itertools into a user process for its own use. Enter



and nothing shows up because Idle doesn't import turtle. Cntl- \ does nothing. Input

import turtle


it doesn't help immediately with calling the function, but if you run the file to do the import, hints for the turtle functions become available.

This suggests that you might want to run the file after writing the import instructions at the top, or immediately run an existing file before editing.


  • I suspect that your problem is that you are trying to get a hint for a function that is currently not available, although it may have been available before and will become available after running your code.

    / li>
  • I opened question 24028 to add something like the above to the Idle docs as a subsection on calltips after subsection on completions

  • Existing question 1350 is about adding an option to display the full docstring.

  • The accessibility issue is a nuisance. I have a couple of ideas to improve it. In the meantime, use the suggestion above to run your import.



All Articles