Serhiy Storchaka <[email protected]> added the comment:
Yes, of course. And if it overrides some methods, but do not specify doctrings
for new methods, they will be inherited from the parent class.
class A:
"""Base class"""
def foo(self): """Some docstring"""
def bar(self): """Other docstring"""
class B(A):
def foo(self): pass
help(B)
Help on class B in module __main__:
class B(A)
| Method resolution order:
| B
| A
| builtins.object
|
| Methods defined here:
|
| foo(self)
| Some docstring
|
| ----------------------------------------------------------------------
| Methods inherited from A:
|
| bar(self)
| Other docstring
|
...
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40257>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com