classonlymethod
This class is a specialized decorator that restricts a method's access exclusively to the class level, preventing it from being called by instances. It inherits from the built-in classmethod and raises an AttributeError if an attempt is made to access the decorated method through an instance.
Constructor
Signature
def classonlymethod(
method: callable
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| method | callable | The function to be wrapped as a class-only method. |