L
Leif K-Brooks
Should a class's constructor be documented in the class's docstring or
__init__'s docstring? For instance:
class Foo(object):
"""This class represents mating lizards. Constructor requires one
argument, the lizard this lizard is mating with."""
def __init__(self, other):
pass
# or
class Bar(object):
""This class represents mating lizards."""
def __init__(self, other):
"""Initiate the object. Requires one argument, "other", which is the
lizard this lizard is mating with."""
pass
__init__'s docstring? For instance:
class Foo(object):
"""This class represents mating lizards. Constructor requires one
argument, the lizard this lizard is mating with."""
def __init__(self, other):
pass
# or
class Bar(object):
""This class represents mating lizards."""
def __init__(self, other):
"""Initiate the object. Requires one argument, "other", which is the
lizard this lizard is mating with."""
pass