-
-
Save terapyon/3bae7264f2246b5a3022d359cc349bd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import b | |
class A: | |
def __init__(self, save_dir): | |
self.save_dir = save_dir | |
save_dialog = A(b.prefs.get('save_dir')) | |
def show(): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import a | |
class B: | |
def get(self, name): | |
pass | |
prefs = B() | |
a.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python3 | |
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08) | |
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import b | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/Users/terapyon/tmp/effective/b.py", line 1, in <module> | |
import a | |
File "/Users/terapyon/tmp/effective/a.py", line 7, in <module> | |
save_dialog = A(b.prefs.get('save_dir')) | |
AttributeError: module 'b' has no attribute 'prefs' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment