Created
June 1, 2012 19:34
-
-
Save tommetge/2854624 to your computer and use it in GitHub Desktop.
network.py options
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
| # option 1: | |
| def __init__(self, ...): | |
| if node_url: | |
| self.node = Node(...) | |
| def _node(self): | |
| if not self.node: | |
| raise errors.NetworkError | |
| return self.node | |
| # option 2: | |
| def set_node_url(self, node_url): | |
| self.node = Node(...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment