Skip to content

Commit fd98be8

Browse files
📜🤖 Added by blurb_it.
1 parent dbf50e8 commit fd98be8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The bitwise inversion operator (~) on bool is deprecated.
2+
It returns the bitwise inversion of the underlying ``int`` representation such that
3+
``bool(~True) == True``, which can be confusing. Use ``not`` for logical negation
4+
of bools. In the rare case that you really need the bitwise inversion of the underlying ``int``,
5+
convert to int explicitly ``~int(x)``.

0 commit comments

Comments
 (0)