Discuss / Python / s

王日天95

#1 Created at ... [Delete] [Delete and Lock User]

class Chain(): def init(self,path=''): self._path = path def getattr(self, item): if item == 'users': return lambda x: Chain('%s/%s' % (self._path,x)) return Chain('%s/%s' % (self._path,item)) def str(self): return self._path repr=str

print(Chain().status.users('wanglei').timeless.list)


  • 1

Reply