simplex/__init__.py | raw changeset files shortlog |
1.1 --- a/simplex/__init__.py Sat Oct 01 15:07:17 2011 +0200 1.2 +++ b/simplex/__init__.py Sat Oct 01 16:01:22 2011 +0200 1.3 @@ -101,9 +101,15 @@ 1.4 """ 1.5 1.6 for record in reader.get_records(): 1.7 - if term == accessor.get_key(record): 1.8 + key = accessor.get_key(record) 1.9 + if term == key: 1.10 return record 1.11 1.12 + # Short-circuit failed searches. 1.13 + 1.14 + elif term < key: 1.15 + return None 1.16 + 1.17 return None 1.18 1.19 def groups(l, length):