floyd added the comment:
Yes, I agree this should be closed. Especially because my proposed code is so
incredibly bad (e.g. regarding performance) that it should be rejected. Back
then I was horribly wrong and didn't understand the problem well enough yet.
If somebody would like to
floyd added the comment:
Agree with the separate function (especially as the return value would change
from float to bool).
In my experience this is one of the most often occuring use cases for difflib
in practice.
Another reason is that it is not obvious that the user can optimize it with
floyd added the comment:
Now that I gave it another thought, I think it would be better if we simply add
threshold as a named parameter of quick_ratio
--
___
Python tracker
<http://bugs.python.org/issue24
New submission from floyd:
I guess a lot of users of difflib call the SequenceMatcher in the following way
(where a and b often have different lengths):
if difflib.SequenceMatcher.quick_ratio(None, a, b) >= threshold:
However, for this use case the current quick_ratio is quite a performa
New submission from R.D. floyd :
Recently upgraded to OS 10.5, Experienced Fortran, Basic, et. al.
programmer learning Python. IDLE 3.01 give invalid syntec error when
running program below. IDLE from MacPython 2.xx runs it ok!
--
components: IDLE
files: odbchelper.py
messages: 86609