8000 gh-82012: Deprecate bitwise inversion (~) of bool by timhoffm · Pull Request #103487 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-82012: Deprecate bitwise inversion (~) of bool #103487

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
May 3, 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
Update Doc/library/stdtypes.rst
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
  • Loading branch information
timhoffm and hauntsaninja authored May 1, 2023
commit 2db5864da0f0207d0bb475222493aeed4bded8be
2 changes: 1 addition & 1 deletion Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ over ``&``, ``|`` and ``^``.
raise an error in Python 3.14.

:class:`bool` is a subclass of :class:`int` (see :ref:`typesnumeric`). In
many numeric contexts, bools behave like the integers 0 and 1, respectively.
many numeric contexts, ``False`` and ``True`` behave like the integers 0 and 1, respectively.
However, relying on this is discouraged; explicitly convert using :func:`int`
instead.

Expand Down
0