Skip to content

Instantly share code, notes, and snippets.

@marcelolebre
Created April 30, 2017 11:56
Show Gist options
  • Save marcelolebre/9fcbc4c64959bc4eeeff34b20c57d174 to your computer and use it in GitHub Desktop.
Save marcelolebre/9fcbc4c64959bc4eeeff34b20c57d174 to your computer and use it in GitHub Desktop.
class AppHandler(object):
@classmethod
def create(cls, name, description):
return CreateAppService(name, description).call()
@classmethod
def update(cls, app_id, name, description):
app = AppFinder.get_from_id(app_id)
return UpdateAppService(app, name, description).call()
@classmethod
def delete(cls, app_id):
app = AppFinder.get_from_id(app_id)
return DeleteAppService(app).call()
@jicksonp
Copy link

Any specific reason to use @classmethod here? Can we use @staticmethod also for these methods?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment