예제 #1
0
 def __init__(self, cls, initial_list=None):
     UserList.__init__(self)
     if initial_list:
         for item in initial_list:
             if isinstance(item, cls):
                 self.data.append(item)
             elif isinstance(item, dict):
                 self.data.append(cls.from_json(item))
예제 #2
0
    def __init__(self, values, offset=None, total=None, limit=None):
        UserList.__init__(self, values)

        # if set, this is the index in the overall results of the first element of
        # this list
        self.offset = offset

        # if set, this is the total number of results
        self.total = total

        # if set, this is the limit, either from the user or the implementation
        self.limit = limit
예제 #3
0
파일: base.py 프로젝트: buildbot/buildbot
    def __init__(self, values, offset=None, total=None, limit=None):
        UserList.__init__(self, values)

        # if set, this is the index in the overall results of the first element of
        # this list
        self.offset = offset

        # if set, this is the total number of results
        self.total = total

        # if set, this is the limit, either from the user or the implementation
        self.limit = limit