reclassmethod
Wraps a method by extracting its underlying function and converting it into a class method.
def reclassmethod(
method: callable
) - > classmethod
Converts a bound method or a function into a class method by extracting its underlying function and wrapping it with the classmethod decorator.
Parameters
| Name | Type | Description |
|---|---|---|
| method | callable | The method or function to be converted into a class method. |
Returns
| Type | Description |
|---|---|
classmethod | A class method object that can be called on the class rather than an instance. |