Skip to content

Instantly share code, notes, and snippets.

@holyketzer
Last active August 29, 2015 14:01
Show Gist options
  • Save holyketzer/95d092f27b3f78df1fbc to your computer and use it in GitHub Desktop.
Save holyketzer/95d092f27b3f78df1fbc to your computer and use it in GitHub Desktop.
class Player:
def __init__(self, type):
self.type = type
def do_work(self, *params):
if self.type == 'file':
# Do something like this
lines = open(*params).readlines()
for line in lines:
self.do_something(line)
pass
elif self.type == 'internet':
# Do something
pass
elif self.type == 'local_network':
# Do something
pass
def do_something(self, line):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment