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
ae8750bc
Commit
ae8750bc
authored
Jun 02, 2017
by
Jamiel Almeida
Committed by
Brett Cannon
Jun 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-24899: Add comparison table for os.path -> pathlib (GH-1753)
parent
7a99625e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
Doc/library/pathlib.rst
Doc/library/pathlib.rst
+33
-0
Misc/ACKS
Misc/ACKS
+5
-4
No files found.
Doc/library/pathlib.rst
View file @
ae8750bc
...
...
@@ -1055,3 +1055,36 @@ call fails (for example because the path doesn't exist):
'Text file contents'
.. versionadded:: 3.5
Correspondence to tools in the :mod:`os` module
-----------------------------------------------
Below is a table mapping various :mod:`os` functions to their corresponding
:class:`PurePath`/:class:`Path` equivalent.
.. note::
Although :func:`os.path.relpath` and :meth:`PurePath.relative_to` have some
overlapping use-cases, their semantics differ enough to warrant not
considering them equivalent.
============================ ==============================
os and os.path pathlib
============================ ==============================
:func:`os.path.abspath` :meth:`Path.resolve`
:func:`os.getcwd` :func:`Path.cwd`
:func:`os.path.exists` :meth:`Path.exists`
:func:`os.path.expanduser` :meth:`Path.expanduser` and
:meth:`Path.home`
:func:`os.path.isdir` :meth:`Path.is_dir`
:func:`os.path.isfile` :meth:`Path.is_file`
:func:`os.path.islink` :meth:`Path.is_symlink`
:func:`os.stat` :meth:`Path.stat`,
:meth:`Path.owner`,
:meth:`Path.group`
:func:`os.path.isabs` :meth:`PurePath.is_absolute`
:func:`os.path.join` :func:`PurePath.joinpath`
:func:`os.path.basename` :data:`PurePath.name`
:func:`os.path.dirname` :data:`PurePath.parent`
:func:`os.path.splitext` :data:`PurePath.suffix`
============================ ==============================
Misc/ACKS
View file @
ae8750bc
...
...
@@ -33,6 +33,7 @@ Fred Allen
Jeff Allen
Ray Allen
Billy G. Allie
Jamiel Almeida
Kevin Altis
Skyler Leigh Amador
Joe Amenta
...
...
@@ -436,6 +437,7 @@ Tim Everett
Paul Everitt
David Everly
Daniel Evers
evilzero
Winston Ewert
Greg Ewing
Martijn Faassen
...
...
@@ -523,6 +525,7 @@ Elazar (אלעזר) Gershuni
Ben Gertzfield
Nadim Ghaznavi
Dinu Gherman
Subhendu Ghosh
Jonathan Giddy
Johannes Gijsbers
Michael Gilfix
...
...
@@ -1242,6 +1245,7 @@ Jérôme Radix
Burton Radons
Abhilash Raj
Shorya Raj
Dhushyanth Ramasamy
Jeff Ramnani
Bayard Randel
Varpu Rantala
...
...
@@ -1505,6 +1509,7 @@ Nathan Sullivan
Mark Summerfield
Reuben Sumner
Eryk Sun
Sanjay Sundaresan
Marek Šuppa
Hisao Suzuki
Kalle Svensson
...
...
@@ -1747,7 +1752,3 @@ Jelle Zijlstra
Gennadiy Zlobin
Doug Zongker
Peter Åstrand
evilzero
Dhushyanth Ramasamy
Subhendu Ghosh
Sanjay Sundaresan
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