mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-41905: Add abc.update_abstractmethods() (GH-22485)
This function recomputes `cls.__abstractmethods__`. Also update `@dataclass` to use it.
This commit is contained in:
parent
a8bf44d049
commit
bef7d299eb
7 changed files with 256 additions and 5 deletions
|
@ -254,6 +254,13 @@ The :mod:`functools` module defines the following functions:
|
|||
application, implementing all six rich comparison methods instead is
|
||||
likely to provide an easy speed boost.
|
||||
|
||||
.. note::
|
||||
|
||||
This decorator makes no attempt to override methods that have been
|
||||
declared in the class *or its superclasses*. Meaning that if a
|
||||
superclass defines a comparison operator, *total_ordering* will not
|
||||
implement it again, even if the original method is abstract.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue