Message91940
I tried Python's bisect module on a large word list (words.txt contained
in http://www.greenteapress.com/thinkpython/swampy/swampy.1.1.zip)
If I search for something like 'musefully', 'museful' will come up as a
match. Maybe that's a feature... but seems to me like a bug.
Too much optimization going on here it seems, to such an extent that
false positives are given.
Here's the code I tried:
import bisect
fin = open('words.txt')
t = []
for line in fin:
t.append(line.strip())
print(bisect.bisect(t,'musefully')) |
|
Date |
User |
Action |
Args |
2009-08-24 20:59:18 | kaashif | set | recipients:
+ kaashif |
2009-08-24 20:59:18 | kaashif | set | messageid: <1251147558.19.0.488929549089.issue6778@psf.upfronthosting.co.za> |
2009-08-24 20:59:14 | kaashif | link | issue6778 messages |
2009-08-24 20:59:14 | kaashif | create | |
|