[issue6778] False positives given through bisect module (binary search)

2022-03-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
components: +Extension Modules

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6778] False positives given through bisect module (binary search)

2022-03-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
components:  -Distutils, Documentation, Extension Modules, Installation, 
Parser, email
nosy:  -barry, docs@python, dstufft, eric.araujo, lys.nikolaou, pablogsal
type: security -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6778] False positives given through bisect module (binary search)

2022-02-28 Thread Paola Cosio


Change by Paola Cosio :


--
assignee:  -> docs@python
components: +Distutils, Documentation, Installation, Parser, email
nosy: +barry, docs@python, dstufft, eric.araujo, lys.nikolaou, pablogsal
type: behavior -> security

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6778] False positives given through bisect module (binary search)

2009-08-24 Thread kaashif

New submission from kaashif musharraf.az...@gmail.com:

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'))

--
components: Extension Modules
files: words.txt
messages: 91940
nosy: kaashif
severity: normal
status: open
title: False positives given through bisect module (binary search)
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14780/words.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6778
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6778] False positives given through bisect module (binary search)

2009-08-24 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It's not a match, it's an insertion point.  The bisect module doesn't
have a method that can be used directly to determine if an item is not
in the list.  Take a careful look at the example, especially the second
part.

If you think it should have such a method, that would be an enhancement
request.

--
nosy: +r.david.murray, rhettinger
priority:  - normal
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6778
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com