Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===== root/one.py =====
- from root import two
- class One:
- def thing(self):
- print(two.Two())
- ===== root/two.py =====
- from root import one
- class Two:
- def thing(self):
- print(one.One())
- ===== root/__init__.py =====
- ===== REPL session =====
- $ python3
- Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
- Type "help", "copyright", "credits" or "license" for more information.
- >>> from root import one
- >>> one.One().thing()
- <root.two.Two object at 0x7f284b0aead0>
- >>> from root import two
- >>> two.Two().thing()
- <root.one.One object at 0x7f284b0aea10>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement