diff options
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r-- | Lib/pathlib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py index cab4151e22..1bd457a487 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -645,6 +645,13 @@ class PurePath(object): self._parts) or '.' return self._str + @property + def path(self): + try: + return self._str + except AttributeError: + return str(self) + def as_posix(self): """Return the string representation of the path with forward (/) slashes.""" |