Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document __bytes__ in PurePath docstring
  • Loading branch information
barneygale committed May 24, 2023
commit d1b23c88334136b70e2c12476ff6839fdbc20ee1
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