mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Removed ambiguity in __init_subclass__ docs (GH-31540)
(cherry picked from commit ab014978ae
)
Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
This commit is contained in:
parent
e053f0e9f4
commit
b099363fa7
1 changed files with 1 additions and 1 deletions
|
@ -1904,7 +1904,7 @@ Customizing class creation
|
|||
--------------------------
|
||||
|
||||
Whenever a class inherits from another class, :meth:`~object.__init_subclass__` is
|
||||
called on that class. This way, it is possible to write classes which
|
||||
called on the parent class. This way, it is possible to write classes which
|
||||
change the behavior of subclasses. This is closely related to class
|
||||
decorators, but where class decorators only affect the specific class they're
|
||||
applied to, ``__init_subclass__`` solely applies to future subclasses of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue