3

I'm working on a Python project using VSCode and Jupyter notebooks. When working in a notebook, I can bring up the docstring for a given method by pressing shift+tab. This previews the same text as doing print(method_name.__doc__), see screenshot below.

Docstring preview in Jupyter notebook

The above provides a clear picture of which arguments the method expects and what it returns, which is helpful to me.

I want to do the same thing in VSCode. Looking at the answers to this SO question, there's a few hotkeys to view documentation (ctrl+k ctrl i, ctrl+space). However, these do not display the same docstring, but something near-incomprehensible and not very helpful to me - see screenshot below.

What can I do to quickly preview that docstring in VSCode?

Documentation preview attempt in VSCode

bjarkemoensted
  • 2,557
  • 3
  • 24
  • 37

0 Answers0