Skip to content

Wrote up a couple examples for docstrings#712

Merged
kennethreitz merged 4 commits into
realpython:masterfrom
Michael-F-Bryan:docstrings
Oct 31, 2016
Merged

Wrote up a couple examples for docstrings#712
kennethreitz merged 4 commits into
realpython:masterfrom
Michael-F-Bryan:docstrings

Conversation

@Michael-F-Bryan

Copy link
Copy Markdown
Contributor

I added some words about commonly used patterns, as well as touching on what sphinx does and how it turns your code into documentation automatically. Also added a couple links to useful articles if people want to read further. Relevant to #678 and #699

Comment thread docs/writing/documentation.rst Outdated
`thomas-cokelaer.info`_ has a fairly complete article showing more examples for
this style.

While the end result is parsed by Sphinx and renders correctly in a browser, it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of this paragraph. I'm not a fan of that first-line indent style, and I think it would be best not to show it altogether.

@kennethreitz

Copy link
Copy Markdown
Contributor

This is great! I left a short note. Other than that, ready to merge!

@Michael-F-Bryan

Copy link
Copy Markdown
Contributor Author

@kennethreitz, would it be better to remove the first example (function1() definition) entirely, plus all references to it, and just mention the numpy-style docstrings?

So remove lines 205-223 of commit 4fb3bf7 and then reword lines 201-203 and 225-227 accordingly, like in to 3c0b027?

@kennethreitz kennethreitz merged commit b81aa84 into realpython:master Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants