Skip to content

Instantly share code, notes, and snippets.

@kalda341
Created September 25, 2018 04:39
Show Gist options
  • Save kalda341/54bc0b13574643b69c8c4449b3a99382 to your computer and use it in GitHub Desktop.
Save kalda341/54bc0b13574643b69c8c4449b3a99382 to your computer and use it in GitHub Desktop.
class Ec2BaseCommand:
def __init__(self, resource):
# Set up some state
self.resource = resource
def __call__(self, suffix):
print('Build: "{}" with options [{}]'.format(self.resource, suffix))
command = Ec2BaseCommand('resource 123')
command('suffix')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment