add reverse() to blist

This commit is contained in:
Mahmoud Hashemi 2013-03-20 20:47:28 -07:00
parent 0694da09b9
commit b23c9448b3
1 changed files with 5 additions and 0 deletions

View File

@ -213,6 +213,11 @@ class BarrelList(object):
self.lists[0] = sorted(chain(*[sorted(l) for l in self.lists]))
self._balance_list(0)
def reverse(self):
for cur in self.lists:
cur.reverse()
self.lists.reverse()
def count(self, item):
return sum([cur.count(item) for cur in self.lists])