About 50 results
Open links in new tab
  1. How do I create multiline comments in Python? - Stack Overflow

    112 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. python - Docstrings vs Comments - Stack Overflow

    I'm a bit confused over the difference between docstrings and comments in python. In my class my teacher introduced something known as a 'design recipe', a set of steps that will supposedly help us

  4. What is the Pythonic way to create informative comments in Python ...

    In Python the resource you are looking for is called doc string. Other people have suggested to read the documentation, and I suggest to check this link: Sphinx Project.

  5. How to comment out a block of code in Python [duplicate]

    6 In Eclipse + PyDev, Python block commenting is similar to Eclipse Java block commenting; select the lines you want to comment and use Ctrl + / to comment. To uncomment a commented block, do the …

  6. Python comments: # vs. strings - Stack Overflow

    Don't misuse strings (no-op statements) as comments. Docstrings, e.g. the first string in a module, class or function, are special and definitely recommended. Note that docstrings are documentation, and …

  7. What does '# noqa' mean in Python comments? - Stack Overflow

    Jul 27, 2017 · While searching through a Python project, I found a few lines commented with # noqa. import sys sys.path.append(r'C:\\dev') import some_module # noqa What does noqa mean in …

  8. What is the common header format of Python files?

    Oct 6, 2009 · Proposed Solution I propose to make the Python source code encoding both visible and changeable on a per-source file basis by using a special comment at the top of the file to declare the …

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

  10. python - Writing comments to files with ConfigParser - Stack Overflow

    Jul 8, 2011 · Since you want to keep your application as "stock" as possible (not using external library), you may want to subclass the ConfigParser to allow reading/updating/writing with comments preserved.