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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kermitthefrogpy
    New Member
    • May 2021
    • 2

    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.

    Code:
    {'Args': None, 'Returns': None, 'Raises': None, 'Attributes': None, 'Summary': None, 'Description': None}
    Output that probably is the solution
    Code:
    '''
    The Pear object describes the properties of pears.
    
    Args:
    a: 
    b: 
    
    Attributes:
    a:  parameter a
    b:  parameter b
    
    '''
    I mean I don't even have idea how to start with this one, any tips in this task?
Working...