Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Open
Description
Feature or enhancement
Proposal:
Add checking if sequencesa[alo:ahi] andb[blo:bhi] are the same on the beginning of the methodfind_longest_match inSequenceMatcher. For identical sequences there is no reason to run whole logic when simple check can be done. It appears to fix issue when comparing two slightly different strings ends up with waiting forever for the result. This solves problem reported herepytest-dev/pytest#8998
Proposed fix:
ifa[alo:ahi]==b[blo:bhi]:returnMatch(alo,blo,len(a[alo:ahi]))
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response