From b821600316daa0328a37808b27b309dc3b5612d3 Mon Sep 17 00:00:00 2001 From: slozier Date: Mon, 29 Jan 2024 09:59:37 -0500 Subject: [PATCH] Add __fspath__ to pathlib (#1774) --- Src/StdLib/Lib/pathlib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/StdLib/Lib/pathlib.py b/Src/StdLib/Lib/pathlib.py index 4fa872d62..89356e1f4 100644 --- a/Src/StdLib/Lib/pathlib.py +++ b/Src/StdLib/Lib/pathlib.py @@ -648,6 +648,10 @@ def __str__(self): self._parts) or '.' return self._str + # ironpython: backport from 3.6 + def __fspath__(self): + return str(self) + def as_posix(self): """Return the string representation of the path with forward (/) slashes."""