[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-05-01 Thread Lewis Ball
Lewis Ball added the comment: Thanks Tim. Cheers for your support with this :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-29 Thread Tim Peters
Tim Peters added the comment: All done. Thank you, Lewis! You're now an official Python contributor, and are entitled to all the fame, fortune, and power that follows. Use your new powers only for good :-) -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-29 Thread Tim Peters
Tim Peters added the comment: New changeset 3209cbd99b6d65aa18b3beb124fac9c792b8993d by lrjball in branch 'master': bpo-40394 - difflib.SequenceMatched.find_longest_match default args (GH-19742) https://github.com/python/cpython/commit/3209cbd99b6d65aa18b3beb124fac9c792b8993d --

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball
Lewis Ball added the comment: Oh okay, well I was just saying I have added a test which is unrelated to the feature I have added, but it does test a different part of the same function. Anyway, I have raised a PR for this now (19742) and can separate it out if needed. --

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball
Change by Lewis Ball : -- keywords: +patch pull_requests: +19064 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19742 ___ Python tracker

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Tim Peters
Tim Peters added the comment: I'm not clear on exactly what it is you're asking, but it's better to ask for forgiveness than permission ;-) That is, it's unlikely anyone will object to adding a test in a feature PR. -- stage: -> needs patch versions: +Python 3.9

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball
Lewis Ball added the comment: Adding a test for this and noticed I can add one more test case to get the method to full coverage. Can I add that to this PR or should I raise a separate one? -- ___ Python tracker

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-27 Thread Lewis Ball
Lewis Ball added the comment: Okay, that makes sense. I will raise a PR -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-26 Thread Tim Peters
Tim Peters added the comment: Sounds good to me, Lewis - thanks! Note, though, that alo and blo should default to 0. `None` is best reserved for cases where the default value needs to be computed at runtime. But alo == blo == 0 apply to all possible instances. --

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-26 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-26 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-26 Thread Lewis Ball
New submission from Lewis Ball : The usage of difflib.SequenceMatcher.find_longest_match could be simplified for the most common use case (finding the longest match between the entirety of the two strings) by taking default args. At the moment you have to do: >>> from difflib import