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
b08388d5
Commit
b08388d5
authored
Jun 09, 2016
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #27182: Document os.PathLike.
Part of PEP 519.
parent
516f5461
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Doc/library/functions.rst
Doc/library/functions.rst
+3
-0
Doc/library/os.rst
Doc/library/os.rst
+21
-0
No files found.
Doc/library/functions.rst
View file @
b08388d5
...
...
@@ -1077,6 +1077,9 @@ are always available. They are listed here in alphabetical order.
.. versionchanged:: 3.5
The ``'namereplace'`` error handler was added.
.. versionchanged:: 3.6
Support added to accept objects implementing :class:`os.PathLike`.
.. function:: ord(c)
Given a string representing one Unicode character, return an integer
...
...
Doc/library/os.rst
View file @
b08388d5
...
...
@@ -175,6 +175,9 @@ process and user.
.. versionadded:: 3.2
.. versionchanged:: 3.6
Support added to accept objects implementing :class:`os.PathLike`.
.. function:: fsdecode(filename)
...
...
@@ -185,6 +188,9 @@ process and user.
.. versionadded:: 3.2
.. versionchanged:: 3.6
Support added to accept objects implementing :class:`os.PathLike`.
.. function:: fspath(path)
...
...
@@ -195,6 +201,21 @@ process and user.
(which is represented by :class:`os.PathLike`). All other types raise a
:exc:`TypeError`.
.. versionadded:: 3.6
.. class:: PathLike
An :term:`abstract base class` for objects representing a file system path,
e.g. :class:`pathlib.PurePath`.
.. abstractmethod:: __fspath__()
Return the file system path representation of the object.
The method should only return a :class:`str` or :class:`bytes` object,
with the preference being for :class:`str`.
.. function:: getenv(key, default=None)
...
...
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