Message359847
>>> tuple(difflib.context_diff(["abc"], ["bcd"], fromfile=Path("example.py")))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/difflib.py", line 1254, in context_diff
_check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm)
File "/usr/local/lib/python3.9/difflib.py", line 1301, in _check_types
raise TypeError('all arguments must be str, not: %r' % (arg,))
TypeError: all arguments must be str, not: PosixPath('example.py')
IMHO to and from file arguments should accept PathLike objects. If agreed I can prepare a patch. |
|
Date |
User |
Action |
Args |
2020-01-12 12:58:02 | BTaskaya | set | recipients:
+ BTaskaya |
2020-01-12 12:58:02 | BTaskaya | set | messageid: <1578833882.54.0.425753104323.issue39311@roundup.psfhosted.org> |
2020-01-12 12:58:02 | BTaskaya | link | issue39311 messages |
2020-01-12 12:58:02 | BTaskaya | create | |
|