About 50 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. Python multiline comments - Stack Overflow

    Aug 19, 2021 · 2 I am struggling with multi line comments in Python, I understood I can use # at the start of every line of multi line comments but there is also another way of using """ at the start and end of …

  6. In Python, how are triple quotes (""") considered comments by the IDE?

    Aug 19, 2021 · Triple quoted strings are used as comment by many developers but it is actually not a comment, it is similar to regular strings in python but it allows the string to be in multi-line. You will …

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

  8. How to wrap and align comments in Python code? - Stack Overflow

    Multi-line comments conventionally simply repeat . In my opinion it is a bad design choice, especially because most IDEs highlight strings differently (and stronger) to comments when they are not …

  9. python - Proper use of comments - Stack Overflow

    Sep 23, 2017 · Inline-comments = Explanation of why the code is written the way it is written. See the requests library for a great example of a project that uses comments appropriately. When to use Doc …

  10. 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 …