3

I am writing a Python module that uses Numpy. I am trying to follow the Numpy docstring format. In many of my functions, the same parameters show up. It seems repetitive to explain what they are in more than one function from the same module. Is there a common practice when dealing with this?

3
  • 1
    Have you considered changing API to be concise? Like extracting an object or two to encapsulate some state?
    – Basilevs
    Commented Dec 8, 2016 at 2:59
  • Admittedly, I'm not sure what that means. I'm more so doing scientific computing than software development
    – Vermillion
    Commented Dec 8, 2016 at 3:04
  • Nevermind, discussing this here would be ignorant to your question. My point was to remove argument repetition instead of documenting it.
    – Basilevs
    Commented Dec 8, 2016 at 3:11

1 Answer 1

4

Add a verbose parameter description to class or package documentation and add short reference to it from every function documentation. Basically, bite the bullet. This can't be automated or conveniently enhanced more.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.