Skip to content

Commit ecc9615

Browse files
author
nick pisarro
committed
Convert some temporary list expressions to generators
1 parent eab60a1 commit ecc9615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pybloom/pybloom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def add(self, key):
366366
@property
367367
def capacity(self):
368368
"""Returns the total capacity for all filters in this SBF"""
369-
return sum([f.capacity for f in self.filters])
369+
return sum(f.capacity for f in self.filters)
370370

371371
@property
372372
def count(self):
@@ -415,7 +415,7 @@ def fromfile(cls, f):
415415

416416
def __len__(self):
417417
"""Returns the total number of elements stored in this SBF"""
418-
return sum([f.count for f in self.filters])
418+
return sum(f.count for f in self.filters)
419419

420420

421421
if __name__ == "__main__":

0 commit comments

Comments
 (0)