- Place the caret after the declaration of a function you want to document.
- Type opening triple quotes, and press Enter, or Space.
- Add meaningful description of parameters and return values.
If you rename a parameter of a function, PyCharm will correspondingly update the tag in documentation comment.
- Place the caret somewhere within the function you want to document.
- Press Alt+Enter to show the available intention actions.
- Choose Insert documentation string stub:

PyCharm generates documentation comment stub according to docstring format, selected in the Python Integrated Tools page.
- In a comment block, select the desired empty line and type @ or : character.
- Press Ctrl+Space, or just wait for Code Completion to display the suggestion list:

- Select a tag from the suggestion list. For example, you can specify the parameters type, or return type.
- If a certain tag has several values, press Ctrl+Space after the tag, and select
the desired value from the suggestion list. For example, PyCharm suggests to select the desired parameter name.

Example of Python comment
Consider the following function:
def handle(self, myParam1, myParam2):
In the Python Integrated Tools page, select Epytext. Then type the opening triple quotes and press Enter or Space. PyCharm generates documentation comment stub:
'''
@param self:
@param myParam1:
@param myParam2:
@return:
'''
Then select reStructuredText, type the opening triple quotes and press Enter or Space. PyCharm generates documentation comment stub:
'''
:param self:
:param myParam1:
:param myParam2:
:return:
'''
