classification
Title: wrong result for difflib.SequenceMatcher
Type: behavior Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Boris Yang
Priority: normal Keywords:

Created on 2018-11-21 07:14 by Boris Yang, last changed 2018-11-21 07:16 by Boris Yang. This issue is now closed.

Messages (1)
msg330174 - (view) Author: (Boris Yang) Date: 2018-11-21 07:14
How to repeat:

from difflib import SequenceMatcher
seqMatcher = SequenceMatcher(None, "德阳孩子", "孩子德阳")
seqMatcher.get_matching_blocks()

Expect Result:
[Match(a=0, b=3, size=2), Match(a=2, b=0, size=2), Match(a=5, b=5, size=0)]

Current Result:
[Match(a=0, b=3, size=2), Match(a=5, b=5, size=0)]
History
Date User Action Args
2018-11-21 07:16:16Boris Yangsetstatus: open -> closed
stage: resolved
2018-11-21 07:14:32Boris Yangcreate