[docs] [issue23153] Clarify Boolean Clause Results
John Potelle
report at bugs.python.org
Fri Jan 2 23:13:42 CET 2015
New submission from John Potelle:
>From v3.4 Tutorial section 5.7
It is possible to assign the result of a comparison or other Boolean expression to a variable. For example,
>>> string1, string2, string3 = '', 'Trondheim', 'Hammer Dance'
>>> string1 or string2 or string3
'Trondheim'
>>> bool(string1 or string2 or string3)
True
In most languages a Boolean clause (comparison) returns a Boolean or it's equivalent, not the last argument evaluated. Please add a reference to bool function (or some better? method) in this section for clarification.
----------
assignee: docs at python
components: Documentation
messages: 233330
nosy: docs at python, jpotelle
priority: normal
severity: normal
status: open
title: Clarify Boolean Clause Results
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23153>
_______________________________________
More information about the docs
mailing list