You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python style guide for docstrings gives inconsistent advice for indentation. It initially says,
Sections should be indented two spaces, except for the heading
Yet all of the examples feature four spaces of indentation. Further, under the Args section, it says,
If the description is too long to fit on a single 80-character line, use a hanging indent of 2 or 4 spaces (be consistent with the rest of the file).
Probably the first quote should read "Sections should be indented two or four spaces (be consistent with the rest of the file), except for the heading."
The text was updated successfully, but these errors were encountered:
Thanks, internally we recommend two for this as it matches our internal coding convention. But I like your suggestion of just saying use either within the docstrings so long as it is consistent within the file. There is no strong reason to require four for docstring section indentation regardless of PEP-8 code four space indentation.
Nope. The world at large should not be infected with Google's internal style quirks. This guide keeps in line with PEP-8 and what the entire world's Python editor configs use: four space indentation.
The Python style guide for docstrings gives inconsistent advice for indentation. It initially says,
Yet all of the examples feature four spaces of indentation. Further, under the Args section, it says,
Probably the first quote should read "Sections should be indented two or four spaces (be consistent with the rest of the file), except for the heading."
The text was updated successfully, but these errors were encountered: