Discuss / Python / 给大家发个简单一点的

给大家发个简单一点的

Topic source

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

    def __init__(self, path=""):

        self.path = path

    def __getattr__(self, path):

        self.path = '%s/%s' % (self.path, path)

        return self

    def __str__(self):

        return  self.path

    __repr__ = __str__

print(Method().status.user.list)


  • 1

Reply