mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-118767: Improve tests and docs for bool(NotImplemented) (#118813)
This commit is contained in:
parent
82acc5f211
commit
35b5eaa176
4 changed files with 15 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue