New submission from Hubert Bonnisseur-De-La-Bathe <hubertb...@gmail.com>:

Reading first at the documentation of difflib, I thought that the use of junks 
would have produced the result 

s = SequenceMatcher(lambda x : x == " ", "abcd efgh", "abcdefgh")
s.get_matching_blocks()
>>> [Match(a=0, b=0, size=8)]

At a second lecture, it is clear that such evaluation will return in fact two 
matches of length 4.

Would it be nicer to have get_matching_block return the length 8 match ? 

Don't know if it's in the spirit of the lib, I'm just asking.

----------
assignee: docs@python
components: Documentation
messages: 388491
nosy: docs@python, hubertbdlb
priority: normal
severity: normal
status: open
title: Junks in difflib
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43473>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to