justmagic
Use a function as a method with this mystic script, just like in Nim.
Just an example
import justmagic
justmagic.install(strict=False)
class Person:
def __init__(self, name: str) -> None:
self.name = name
def hello(who: Person, prefix: str):
return f"Hello {prefix} {who.name}"
me = Person("John")
me.hello("mr.").print()
Strict mode enables types checking.
Installation
pip3 install justmagic