Skip to content

Commit

Permalink
Document __bytes__ in PurePath docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed May 24, 2023
1 parent ace5824 commit d1b23c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ class PurePath(_BasePurePath):
instantiating a PurePath will return either a PurePosixPath or a
PureWindowsPath object. You can also instantiate either of these classes
directly, regardless of your system.
On Posix, calling ``bytes()`` on a path gives the raw filesystem path as
a bytes object, as encoded by ``os.fsencode()``. On Windows, the unicode
form is the canonical representation of fileysstem paths, and so calling
``bytes()`` on a path is not recommended.
"""
__slots__ = ()

Expand Down

0 comments on commit d1b23c8

Please sign in to comment.