[issue39311] difflib pathlike support for {unified, context}_diff() {from, to}file

2020-01-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Elsewhere users of Path objects must explicitly coerce to str. For example: json.dumps(str(Path("example.py"))). This makes good sense to me. We don't want to add an dependency on pathlib just to recognize Path objects. -- nosy: +rhettinger r

[issue39311] difflib pathlike support for {unified, context}_diff() {from, to}file

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

[issue39311] difflib pathlike support for {unified, context}_diff() {from, to}file

2020-01-12 Thread Batuhan
New submission from Batuhan : >>> tuple(difflib.context_diff(["abc"], ["bcd"], fromfile=Path("example.py"))) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/difflib.py", line 1254, in context_diff _check_types(a, b, fromfile, tofile, fromfiledate, t