3 ms·
What is wrong with his docstrings?
by junke 10y ago
What is wrong with his docstrings?
- benhoyt 10y agoNothing's wrong with them. Though it is more usual to use triple quotes for docstrings even if they fit on one line (see PEP 257, "Triple quotes are used even though the string fits on one line. This makes it easy to later expand it.").
- xapata 10y agoEasy in the sense of more pleasant version control diffs.
- leblancfg 10y agoCouldn't it cause issues with "object definition" code in REPLs and editors, and interfere with documentation generators, i.e. [Sphinx](http://www.sphinx-doc.org/en/stable/ http://www.sphinx-doc.org/en/stable/)?
- xapata 10y agoI'd be surprised if so. Most of those tools rely on the built-in parser, which treats all string literals similarly.