summaryrefslogtreecommitdiff
path: root/basics/python/circular/b.py
diff options
context:
space:
mode:
Diffstat (limited to 'basics/python/circular/b.py')
-rw-r--r--basics/python/circular/b.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/basics/python/circular/b.py b/basics/python/circular/b.py
new file mode 100644
index 0000000..643e2f7
--- /dev/null
+++ b/basics/python/circular/b.py
@@ -0,0 +1,19 @@
+
+
+# from typing import TYPE_CHECKING
+# if TYPE_CHECKING:
+from a import A
+
+
+class B:
+
+ def __init__(self):
+ self.a_items = []
+
+ def append(self, a: 'A'):
+ a.t()
+ self.a_items.append(a)
+
+ def foo(self):
+ return 5
+