[Doc-SIG] Question about SequenceMatcher.quick_ratio

Doug Hellmann doug.hellmann at gmail.com
Thu May 6 17:06:13 CEST 2010


On May 6, 2010, at 10:48 AM, INADA Naoki wrote:

> Hi, all.
>
> I am one of  translator of Python document.
> But I am not good at English well.
>
> I can't understand one sentence in:
> http://docs.python.org/library/difflib.html#difflib.SequenceMatcher.quick_ratio
>
>> This isn’t defined beyond that it is an upper bound on ratio(), and  
>> is faster to compute.
>
> I see that quick_ratio() calculates upper bound of ratio().
> But I can't get what "this isn't defined beyond that" means.
> May someone explain this in easy sentence for me?

I think it means that the implementation of quick_ratio() is not  
defined in a lot of detail, except to say that the function will  
return a value that is an upper bound of the value returned by  
ratio().  So the value returned by ratio() will always be less than or  
equal to the value returned by quick_ratio(), and quick_ratio() is  
faster than ratio().  real_quick_ratio() has a similar relationship to  
quick_ratio().

Doug



More information about the Doc-SIG mailing list