You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an attribute is documented in the class docstring and also assigned to in __init__, the attribute is documented twice. It should get documented only once. If it is documented in both places, I think it is fine for the choice of which docstring to use to be arbitrary.
class MyClass:
"""My class does stuff.
Attributes:
thing (object): A thing.
"""
def __init__(self):
self.thing = 5
The text was updated successfully, but these errors were encountered:
If an attribute is documented in the class docstring and also assigned to in
__init__
, the attribute is documented twice. It should get documented only once. If it is documented in both places, I think it is fine for the choice of which docstring to use to be arbitrary.The text was updated successfully, but these errors were encountered: