[issue12447] ~True is not False

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: bpo-37831 has been marked as a duplicate of this issue. -- nosy: +vstinner ___ Python tracker ___ ___

[issue12447] ~True is not False

2011-06-29 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is deliberate, and will not be changed (at least not until Python 4, and likely not even then). Please ask on a Python forum about history and motivation of the boolean type in Python if you want to know more. -- nosy: +loewis status: pending ->

[issue12447] ~True is not False

2011-06-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Did you try the "not" operator? http://docs.python.org/reference/expressions.html#boolean-operations >>> not True False >>> not False True -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> pending _

[issue12447] ~True is not False

2011-06-29 Thread Matt Joiner
New submission from Matt Joiner : Given there is no ! operator in Python, I next tried ~ (despite that I'm after a logical not). This came as a surprise: >>> bool(~True) True >>> bool(~False) True >>> bool(~~False) False >>> ~True, ~~True, ~False, ~~False (-2, 1, -1, 0) Is there any considerat