[issue29709] Short-circuiting not only on False and True

New submission from Stefan Pochmann: The notes at https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-no... say that `or` "only evaluates the second argument if the first one is False" and that `and` "only evaluates the second argument if the first one is True". Should say "false" and "true" instead of "False" and "True". ---------- assignee: docs@python components: Documentation messages: 288881 nosy: Stefan Pochmann, docs@python priority: normal severity: normal status: open title: Short-circuiting not only on False and True type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Changes by Serhiy Storchaka <storchaka+cpython@gmail.com>: ---------- keywords: +easy stage: -> needs patch versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Raymond Hettinger added the comment: Mariatta, would you like to fix this one (False -> false and True -> true). ---------- assignee: docs@python -> Mariatta nosy: +Mariatta, rhettinger _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +359 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Mariatta Wijaya added the comment: Thanks, Raymond. I made the PR :) I can backport to 2.7, 3.5, and 3.6 once it's accepted. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +362 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +363 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +364 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Mariatta Wijaya added the comment: Committed and backported to 2.7, 3.5, and 3.6. Thanks all :) ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Mariatta Wijaya added the comment: New changeset fc59e5c7073af4d9255644a83933dd5b14c7f722 by Mariatta in branch '2.7': bpo-29709: Improve Boolean Operations documentation (#433) (#438) https://github.com/python/cpython/commit/fc59e5c7073af4d9255644a83933dd5b14c... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Mariatta Wijaya added the comment: New changeset 6e965d9e78b278f2f720a932e7b149cb7d88bd72 by Mariatta in branch '3.5': bpo-29709: Improve Boolean Operations documentation (#433) (#436) https://github.com/python/cpython/commit/6e965d9e78b278f2f720a932e7b149cb7d8... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Mariatta Wijaya added the comment: New changeset 1936ba93c900d47d0c8c915184ac2fa7773c952e by Mariatta in branch '3.6': bpo-29709: Improve Boolean Operations documentation (#433) (#437) https://github.com/python/cpython/commit/1936ba93c900d47d0c8c915184ac2fa7773... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________

Mariatta Wijaya added the comment: New changeset 8eb531d9db0861e14222445fcaebe1a373bba170 by Mariatta in branch 'master': bpo-29709: Improve Boolean Operations documentation (#433) https://github.com/python/cpython/commit/8eb531d9db0861e14222445fcaebe1a373b... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29709> _______________________________________
participants (4)
-
Mariatta Wijaya
-
Raymond Hettinger
-
Serhiy Storchaka
-
Stefan Pochmann