Skip to content

Commit b821600

Browse files
authored
Add __fspath__ to pathlib (#1774)
1 parent 1671f7f commit b821600

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Src/StdLib/Lib/pathlib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ def __str__(self):
648648
self._parts) or '.'
649649
return self._str
650650

651+
# ironpython: backport from 3.6
652+
def __fspath__(self):
653+
return str(self)
654+
651655
def as_posix(self):
652656
"""Return the string representation of the path with forward (/)
653657
slashes."""

0 commit comments

Comments
 (0)