PyDocs

Nav

Python Runtime Services

update_abstractmethods

abc

function · Added in 3.10 (source)
  • update_abstractmethods(cls)
Recalculate the set of abstract methods of an abstract class.

If a class has had one of its abstract methods implemented after the
class was created, the method will not be considered implemented until
this function is called. Alternatively, if a new abstract method has been
added to the class, it will only be considered an abstract method of the
class after this function is called.

This function should be called before any use is made of the class,
usually in class decorators that add methods to the subject class.

Returns cls, to allow usage as a class decorator.

If cls is not an instance of ABCMeta, does nothing.
0 Examples
No examples for abc/update_abstractmethods.
See Also
No see-alsos for abc/update_abstractmethods
0 Notes
No notes for update_abstractmethods