Global web icon
stackoverflow.com
https://stackoverflow.com/questions/7696924/how-do…
How do I create multiline comments in Python? - Stack Overflow
111 Python does have a multiline string/comment syntax in the sense that unless used as docstrings, multiline strings generate no bytecode -- just like # -prepended comments. In effect, it acts exactly like a comment.
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/2357230/what-i…
What is the proper way to comment functions in Python?
The correct way to do it is to provide a docstring. That way, help(add) will also spit out your comment.
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/13850049/what-…
What is the proper way to comment code in Python? [closed]
What is the most Pythonic way of putting blank lines between comments and the actual code? I want to show my program to some experts. And want my code to look more professional.
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/675442/how-to-…
How to comment out a block of code in Python [duplicate]
Is there a mechanism to comment out large blocks of Python code? Right now, the only ways I can see of commenting out code are to either start every line with a #, or to enclose the code in triple quotes: """.
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/73859210/is-th…
Is there a shortcut to comment multiple lines in python using VS Code ...
Instead of indivually typing out a hash tag in front of each line, is there a way to select a block of code and comment/uncomment everything by only pressing a couple shortcut keys?
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/34316156/how-c…
How can I comment multiple lines in Visual Studio Code?
For python code, the "comment block" command Alt + Shift + A actually wraps the selected text in a multiline string, whereas Ctrl + / is the way to toggle any type of comment (including a "block" comment as asked here).
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/7057450/why-do…
Why does python use unconventional triple-quotation marks for comments?
Most Python IDEs let you select-and-comment a block at a time, this is how many people handle that situation. Then there are normal single-line python strings: They can use ' or " quotation marks (eg 'foo' "bar").
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/21253148/multi…
Multiple line comment in Python - Stack Overflow
Python does have a multiline string/comment syntax in the sense that unless used as docstrings, multiline strings generate no bytecode -- just like #-prepended comments.
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/17630835/is-th…
python - Is there a way to put comments in multiline code ... - Stack ...
Python way is with # on every line if you want to comments something or for inline comments everything after # is ignored. If you really want to comment a multiline statement that is really necessary put it before or after it.
Global web icon
stackoverflow.com
https://stackoverflow.com/questions/46381904/prope…
python - Proper use of comments - Stack Overflow
To clarify: my question is about when to use comments instead of docstrings. Python is opinionated and seems to want to docstrings for most (all?) code description purposes. That being true, are there any circumstances where Python conventions favor comments over docstrings?