Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
df85946e
Commit
df85946e
authored
Jan 06, 2016
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs for issue #22570.
parent
e4282315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Doc/library/pathlib.rst
Doc/library/pathlib.rst
+17
-0
No files found.
Doc/library/pathlib.rst
View file @
df85946e
...
...
@@ -365,6 +365,23 @@ Pure paths provide the following methods and properties:
''
.. data:: PurePath.path
A string representing the full path::
>>> PurePosixPath('my/library/setup.py').path
'my/library/setup.py'
This always returns the same value as ``str(p)``; it is included to
serve as a one-off protocol. Code that wants to support both
strings and ``pathlib.Path`` objects as filenames can write
``arg = getattr(arg, 'path', arg)`` to get the path as a string.
This can then be passed to various system calls or library
functions that expect a string. Unlike the alternative
``arg = str(arg)``, this will still raise an exception if an object
of some other type is given by accident.
.. data:: PurePath.suffix
The file extension of the final component, if any::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment