Skip to content

Instantly share code, notes, and snippets.

@sznurek
Created July 30, 2012 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sznurek/3208751 to your computer and use it in GitHub Desktop.
Save sznurek/3208751 to your computer and use it in GitHub Desktop.
class Action:
def __init__(self):
self.next_action = None
def run(self, socket, vars):
pass # this will be overloaded
def __rshift__(self, other):
self.append_action(other)
def append_action(self, other):
if not self.next_action:
self.next_action = other
else:
self.next_action.append_action(other)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment