Toblerity/Fiona — pull request #129 by rbuffat (2014-08-18 16:12:25+00:00)
Title: reset spatial filter when no bounding box given

a spatial filter, is once set, never removed.
import fiona

if __name__ == '__main__':
with fiona.open("test_uk.shp", 'r') as c:
c1 = 0
for f in c:
# print(f)
c1 += 1
c2 = 0
for f in c.filter(bbox=(-1000, -1000, 0, 0)):
c2 += 1
c3 = 0
for f in c:
c3 += 1
print(c1)
print(c2)
print(c3

Output:
48
0
0