How do I get PyCharm to show method signatures and

2020-05-25 06:08发布

问题:

In IPython's QT console (on Windows 7), if I type:

import scipy
scipy.zeros(

followed by Tab, it displays basic documentation for the method, like its signature, parameters, description, etc. In PyCharm CE 3.4.1, I have IPython enabled as my console, but this doesn't happen. The same is true in the actual editor; if I type this code in the editor, nothing shows up. I don't think this is related to the issue in this question (where PyCharm can't tell the type of something because it's not actually running it) but maybe it is.

回答1:

In pycharm you have ctrl-q (or ctrl-j on a mac) for a quick-doc of the function under the cursor.



回答2:

Ctrl + P to show method signature (parameters) as a pop-up.

other shortcut keys for pycharm are all available here.



回答3:

Very old post but it's still a problem.

To see the function docstring, like what TAB in IPython shows, you should press Ctrl+Shift+I or go to View > Quick Definition while the cursor is within the function name (not between the parenthesis). A pop-up window shows the function docstring including few lines of the function code. However, it's not perfect and may not work in some cases, like pandas.read_csv().



回答4:

If you are looking for Mac shortcut it's Command + P (⌘+P), accepted answer's solution didn't work.