gh-118767: Improve tests and docs for bool(NotImplemented) (#118813)

This commit is contained in:
Jelle Zijlstra 2024-05-09 06:52:08 -07:00 committed by GitHub
parent 82acc5f211
commit 35b5eaa176
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 13 deletions

View file

@ -170,12 +170,12 @@ See
for more details.
.. versionchanged:: 3.9
Evaluating :data:`NotImplemented` in a boolean context is deprecated. While
it currently evaluates as true, it will emit a :exc:`DeprecationWarning`.
It will raise a :exc:`TypeError` in a future version of Python.
Evaluating :data:`NotImplemented` in a boolean context was deprecated.
.. versionchanged:: 3.14
Evaluating :data:`NotImplemented` in a boolean context now raises a :exc:`TypeError`.
It previously evaluated to :const:`True` and emitted a :exc:`DeprecationWarning`
since Python 3.9.
Ellipsis