Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docstring of class #16

Open
ShvarcbergJull opened this issue Jan 27, 2023 · 0 comments
Open

docstring of class #16

ShvarcbergJull opened this issue Jan 27, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ShvarcbergJull
Copy link
Collaborator

оформить 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 ShvarcbergJull added the documentation Improvements or additions to documentation label Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants