-
Notifications
You must be signed in to change notification settings - Fork 0
Docstring examples #47
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
|
|
||
| Return: | ||
| tuple[tuple]: Greatest lower bound | ||
| The meet operation symbol is ∧, for instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add a reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have put the reference on top of every .py files, right below the module description. I saw it done that way in a sympy file I believe. This notation comes from [1] for instance. I personally like to put the reference on top to avoid repeating the same ref in every function. The downside is that it is not explicit what reference correspond to which function. Most reference are related to every function of the module. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is motly ok. However, one issue with this that often you want to see the docstring while typing code. I guess more often than not, what you want are examples, not references so maybe it is OK.
| raise TypeError | ||
|
|
||
|
|
||
| # pylint: disable=invalid-name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of like the wikipedia references to all the group theory concepts ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it as well. I am not sure how to format it though to avoid the clash between proper reference and Wikipedia reference. Thoughts?
nquesada
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some typos and a potential incomplete example.
Also, personally, I prefer to write do not and does not as opposed to don't and doesn't, but I won't try to impose that here.
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Co-authored-by: Nicolás Quesada <991946+nquesada@users.noreply.github.com>
Added examples and references to the docstrings. Slight modification to the docstring format.