Skip to content

Instantly share code, notes, and snippets.

@tommetge
Created June 1, 2012 19:34
Show Gist options
  • Select an option

  • Save tommetge/2854624 to your computer and use it in GitHub Desktop.

Select an option

Save tommetge/2854624 to your computer and use it in GitHub Desktop.
network.py options
# 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