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?

  • 1
    Have you considered changing API to be concise? Like extracting an object or two to encapsulate some state?
    – Basilevs
    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
    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
    Dec 8, 2016 at 3:11

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.