Skip to content

Commit

Permalink
Add __fspath__ to pathlib (#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier committed Jan 29, 2024
1 parent 1671f7f commit b821600
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Src/StdLib/Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit b821600

Please sign in to comment.