EPDE icon indicating copy to clipboard operation
EPDE copied to clipboard

docstring of class

Open ShvarcbergJull opened this issue 2 years ago • 0 comments

оформить docstring к классам в следующем виде:

    """
    A class to represent a person.

    ...

    Attributes
    ----------
    name : str
        first name of the person
    surname : str
        family name of the person
    age : int
        age of the person

    Methods
    -------
    info(additional=""):
        Prints the person's name and age.
    """
  • наверное прописывание docstring для init в таком случае будет лишнее
  • на счёт как лучше сделать, описать Methods для класса или будет достаточно docstring в самих методах: это в зависимости от класса

ShvarcbergJull avatar Jan 27 '23 13:01 ShvarcbergJull