Skip to content

Instantly share code, notes, and snippets.

@danfate
Last active August 29, 2015 14:25
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 danfate/316f1735fb577eca1191 to your computer and use it in GitHub Desktop.
Save danfate/316f1735fb577eca1191 to your computer and use it in GitHub Desktop.
question1
class Chain(object):
def __init__(self, path=''):
self._path = path
def __getattr__(self, path):
return Chain('%s/%s' % (self._path, path))
def __str__(self):
return self._path
__repr__ = __str__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment