Dmitry Telenkov 1 рік тому
батько
коміт
9fa0496ce4
1 змінених файлів з 29 додано та 0 видалено
  1. 29 0
      courses/python_for_begginers/tmp.py

+ 29 - 0
courses/python_for_begginers/tmp.py

@@ -0,0 +1,29 @@
+
+
+from typing import Any
+
+
+class Dad():
+	def __init__(self) -> None:
+		pass
+
+	def __call__(self, *args: Any, **kwds: Any) -> Any:
+		return True
+
+	def foo(self):
+		print("hello")
+
+class TestCall(Dad):
+	# def __init__(self):
+	# 	pass
+
+	# def __call__(self):
+	# 	print("Class __call__")
+		
+	__call__ = Dad.foo
+
+
+call = TestCall()
+call()
+print(isinstance(3, str))
+# print(call())