Skip to content

Instantly share code, notes, and snippets.

@robinbowes
Last active March 9, 2017 16:29
Show Gist options
  • Save robinbowes/597df5d3ccd3526ac37beddb94ebce5f to your computer and use it in GitHub Desktop.
Save robinbowes/597df5d3ccd3526ac37beddb94ebce5f to your computer and use it in GitHub Desktop.
Questions about python style
from status_response import StatusResponse
class SomeClass:
def __init__(self):
self._status = "foo"
@property
def status(self)
return self._status
def get_status(self):
return StatusResponse(self.status).response
class StatusResponse:
def __init__(self, status):
self._status = { "status": status }
@property
def response(self):
return self._status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment