20 lines
455 B
Python
20 lines
455 B
Python
from multinut.explain import Explainable, hello
|
|
|
|
class MyClass(Explainable):
|
|
def my_method(self, x):
|
|
"""This method does something."""
|
|
return x * 2
|
|
|
|
def another(self, msg: str):
|
|
return msg[::-1]
|
|
|
|
|
|
print("=== Class Explanation ===")
|
|
print(MyClass.explain())
|
|
|
|
print("\n=== Method Explanation: my_method ===")
|
|
print(MyClass.my_method.explain())
|
|
|
|
print("\n=== Method Explanation: another ===")
|
|
print(MyClass.another.explain())
|