Convention for specifying that arguments are keyword only?
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 355
- Forks
- 181
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 3
Description
Is there a standard way for the docstring to tell the user that the arguments (or following arguments) are keyword only? Other than some note for each argument? I mean for a situation like this:
def my_func(a, *, b, c):
""" My function does stuff
a : object
Something about `a`.
b : object, keyword-only
Something about `b`.
c : object, keyword-only
Something about `c`.
"""
print(a, b, c)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the issue's six-comment discussion and the Python signature example first. Determine whether numpydoc should describe keyword-only arguments per parameter or through a shared convention; done means an agreed convention is documented for users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100