468,471 Members | 1,742 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,471 developers. It's quick & easy.

Write a function that generates a docstring in Pydoc / Sphinx type

Write a function that generates a docstring in the Pydoc / Sphinx type, based on the definition of the __init__ function in Python. The function should take a set of parameters in the form of a dictionary.

Expand|Select|Wrap|Line Numbers
  1. {'Args': None, 'Returns': None, 'Raises': None, 'Attributes': None, 'Summary': None, 'Description': None}
Output that probably is the solution
Expand|Select|Wrap|Line Numbers
  1. '''
  2. The Pear object describes the properties of pears.
  4. Args:
  5. a: 
  6. b: 
  8. Attributes:
  9. a:  parameter a
  10. b:  parameter b
  12. '''
I mean I don't even have idea how to start with this one, any tips in this task?
May 5 '21 #1
0 1115

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Tony B | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.