Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf02fd4

Browse files
committed
Add deprecation notice for ~ on bool to Doc/whatsnew/3.12.rst
1 parente177cac commitbf02fd4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎Doc/whatsnew/3.12.rst‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,11 @@ Deprecated
692692
Python 3.14, when ``'data'`` filter will become the default.
693693
See:ref:`tarfile-extraction-filter` for details.
694694

695+
* The bitwise inversion operator (~) on bool is deprecated. It will throw an
696+
error in Python 3.14. Use ``not`` for logical negation of bools instead.
697+
In the rare case that you really need the bitwise inversion of the underlying
698+
``int``, convert to int explicitly ``~int(x)``. (Contributed by Tim Hoffmann
699+
in:gh:`103487`.)
695700

696701
Pending Removal in Python 3.13
697702
------------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp