tmp.py 375 B

1234567891011121314151617181920212223242526272829
  1. from typing import Any
  2. class Dad():
  3. def __init__(self) -> None:
  4. pass
  5. def __call__(self, *args: Any, **kwds: Any) -> Any:
  6. return True
  7. def foo(self):
  8. print("hello")
  9. class TestCall(Dad):
  10. # def __init__(self):
  11. # pass
  12. # def __call__(self):
  13. # print("Class __call__")
  14. __call__ = Dad.foo
  15. call = TestCall()
  16. call()
  17. print(isinstance(3, str))
  18. # print(call())