Discuss / Python / my job

my job

Topic source
class Chain(object):    def __init__(self,path=''):        self._path = path    def __getattr__(self, item):        return Chain('%s/%s' % (self._path,item))    def __call__(self,args):        return Chain('%s/%s' % (self._path,args))    def __str__(self):        return self._path    __repr__ = __str__print(Chain().users('Jack').repos)
class Chain(object):

    def __init__(self,path=''):
        self._path = path

    def __getattr__(self, item):
        return Chain('%s/%s' % (self._path,item))

    def __call__(self,args):
        return Chain('%s/%s' % (self._path,args))

    def __str__(self):
        return self._path

    __repr__ = __str__print(Chain().users('Jack').repos)

  • 1

Reply