8000 gh-106046: Improve error message from `os.fspath` if `__fspath__` is set to `None` by AlexWaygood · Pull Request #106082 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106046: Improve error message from os.fspath if __fspath__ is set to None #106082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 25, 2023
Merged
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
Document it
  • Loading branch information
AlexWaygood committed Jun 25, 2023
commit 1dcf5e39d5ba0e14a3100d116c87165b69aca793
5 changes: 3 additions & 2 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3179,8 +3179,9 @@ An example of an asynchronous context manager class::
lead to some very strange behaviour if it is handled incorrectly.

.. [#] The :meth:`~object.__hash__`, :meth:`~object.__iter__`,
:meth:`~object.__reversed__`, and :meth:`~object.__contains__` methods have
special handling for this; others
:meth:`~object.__reversed__`, :meth:`~object.__contains__`,
:meth:`~object.__class_getitem__` and :meth:`~os.PathLike.__fspath__`
methods have special handling for this. Others
will still raise a :exc:`TypeError`, but may do so by relying on
the behavior that ``None`` is not callable.

Expand Down
0