equal
deleted
inserted
replaced
166 self._item = item |
166 self._item = item |
167 def __repr__(self): |
167 def __repr__(self): |
168 return '<cubicweb.utils.RepeatList at %s item=%s size=%s>' % ( |
168 return '<cubicweb.utils.RepeatList at %s item=%s size=%s>' % ( |
169 id(self), self._item, self._size) |
169 id(self), self._item, self._size) |
170 def __len__(self): |
170 def __len__(self): |
171 return self._size |
|
172 def __nonzero__(self): |
|
173 return self._size |
171 return self._size |
174 def __iter__(self): |
172 def __iter__(self): |
175 return repeat(self._item, self._size) |
173 return repeat(self._item, self._size) |
176 def __getitem__(self, index): |
174 def __getitem__(self, index): |
177 return self._item |
175 return self._item |