Python Forum

Full Version: Variable comments on Visual Studio Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I'm starting with python and I'm using vscode.

def a():
    """comment a"""
    pass

one = "one" #try comment var one
"""try comment var one"""
If I try to use "a" function, vscode shows me the tooltip with right text "Comment a".
If I try to use "one" variable, vscode shows me the tooltip with the following content "one: str".

Is it possible to get that comment shown on visual studio code?

Thanks
what you have on line 2 is docstring for function a
what you have on line 5 is just inline comment
what you have on line 6 is just a string that is not assign o variable and is just garbage collected when the time comes
(Oct-19-2019, 01:46 PM)buran Wrote: [ -> ]what you have on line 2 is docstring for function a
what you have on line 5 is just inline comment
what you have on line 6 is just a string that is not assign o variable and is just garbage collected when the time comes

Yes sure, but the question is.. on vscode (using intellisense), is it possible to see a comment related only to a single variable?