About 32,600,000 results
Open links in new tab
  1. 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 …

  2. What is the proper way to comment functions in Python?

    Mar 2, 2010 · The correct way to do it is to provide a docstring. That way, help(add) will also spit out your comment.

  3. 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.

  4. 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: """.

  5. 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" …

  6. Is there a shortcut to comment multiple lines in python using VS Code ...

    Sep 26, 2022 · 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?

  7. Why does python use unconventional triple-quotation marks for …

    Nov 22, 2017 · 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 …

  8. python - Proper use of comments - Stack Overflow

    Sep 23, 2017 · 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 …

  9. Multiple line comment in Python - Stack Overflow

    Jan 21, 2014 · 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.

  10. python - Is there a way to put comments in multiline code ... - Stack ...

    Jul 13, 2013 · 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 …