Kaydet (Commit) 31119e4f authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428).

üst b523f843
...@@ -12,6 +12,7 @@ in this chapter is: ...@@ -12,6 +12,7 @@ in this chapter is:
.. toctree:: .. toctree::
pathlib.rst
os.path.rst os.path.rst
fileinput.rst fileinput.rst
stat.rst stat.rst
......
...@@ -25,6 +25,10 @@ For a literal match, wrap the meta-characters in brackets. ...@@ -25,6 +25,10 @@ For a literal match, wrap the meta-characters in brackets.
For example, ``'[?]'`` matches the character ``'?'``. For example, ``'[?]'`` matches the character ``'?'``.
.. seealso::
The :mod:`pathlib` module offers high-level path objects.
.. function:: glob(pathname) .. function:: glob(pathname)
Return a possibly-empty list of path names that match *pathname*, which must be Return a possibly-empty list of path names that match *pathname*, which must be
......
...@@ -22,6 +22,11 @@ Functions such as :func:`expanduser` and :func:`expandvars` can be invoked ...@@ -22,6 +22,11 @@ Functions such as :func:`expanduser` and :func:`expandvars` can be invoked
explicitly when an application desires shell-like path expansion. (See also explicitly when an application desires shell-like path expansion. (See also
the :mod:`glob` module.) the :mod:`glob` module.)
.. seealso::
The :mod:`pathlib` module offers high-level path objects.
.. note:: .. note::
All of these functions accept either only bytes or only string objects as All of these functions accept either only bytes or only string objects as
......
This diff is collapsed.
...@@ -93,6 +93,7 @@ New library modules: ...@@ -93,6 +93,7 @@ New library modules:
* :mod:`asyncio`: New provisonal API for asynchronous IO (:pep:`3156`). * :mod:`asyncio`: New provisonal API for asynchronous IO (:pep:`3156`).
* :mod:`enum`: Support for enumeration types (:pep:`435`). * :mod:`enum`: Support for enumeration types (:pep:`435`).
* :mod:`ensurepip`: Bootstrapping the pip installer (:pep:`453`). * :mod:`ensurepip`: Bootstrapping the pip installer (:pep:`453`).
* :mod:`pathlib`: Object-oriented filesystem paths (:pep:`428`).
* :mod:`selectors`: High-level and efficient I/O multiplexing, built upon the * :mod:`selectors`: High-level and efficient I/O multiplexing, built upon the
:mod:`select` module primitives. :mod:`select` module primitives.
* :mod:`statistics`: A basic numerically stable statistics library (:pep:`450`). * :mod:`statistics`: A basic numerically stable statistics library (:pep:`450`).
...@@ -318,6 +319,23 @@ compatible enumeration values. ...@@ -318,6 +319,23 @@ compatible enumeration values.
implemented by Ethan Furman. implemented by Ethan Furman.
pathlib
-------
The new :mod:`pathlib` module offers classes representing filesystem paths
with semantics appropriate for different operating systems. Path classes are
divided between *pure paths*, which provide purely computational operations
without I/O, and *concrete paths*, which inherit from pure paths but also
provide I/O operations.
For Python 3.4, this module is considered a :term:`provisional API`.
.. seealso::
:pep:`428` - The pathlib module -- object-oriented filesystem paths
PEP written and implemented by Antoine Pitrou.
selectors selectors
--------- ---------
......
This diff is collapsed.
This diff is collapsed.
...@@ -65,6 +65,8 @@ Core and Builtins ...@@ -65,6 +65,8 @@ Core and Builtins
Library Library
------- -------
- Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428).
- Issue #17916: Added dis.Bytecode.from_traceback() and - Issue #17916: Added dis.Bytecode.from_traceback() and
dis.Bytecode.current_offset to easily display "current instruction" dis.Bytecode.current_offset to easily display "current instruction"
markers in the new disassembly API (Patch by Claudiu Popa). markers in the new disassembly API (Patch by Claudiu Popa).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment