Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Add description for blank lines after the docstring. #229

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

bingyao
Copy link
Contributor

@bingyao bingyao commented Aug 1, 2019

This is mainly a discussion, I notice that there is a blank line between the closing quotes and the pass:

...
"""

pass

But from the PEP 257, it seems that there are no blank lines after the function docstring (no specific statement, but the examples in it don't contain the blank line). And the blank line separation only requires for class docstring:

Insert a blank line after all docstrings (one-line or multi-line) that document a class -- generally speaking, the class's methods are separated from each other by a single blank line, and the docstring needs to be offset from the first method by a blank line. (source)

So I am wondering: should we specifically suggest no the blank line after the functions/methods docstring OR it just doesn't matter and people can choose whatever they like?

@bingyao bingyao force-pushed the doc_blank_lines_after_docstring branch from 2e5033c to 094d744 Compare August 1, 2019 05:11
@larsoner
Copy link
Collaborator

larsoner commented Aug 1, 2019

People can choose whatever they like, but no problem from my end to promote the standard. So +1 for merge from me

@jnothman jnothman merged commit b031883 into numpy:master Aug 2, 2019
@jnothman
Copy link
Member

jnothman commented Aug 2, 2019

Thanks @bingyao, I agree the example was not doing the right thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants