File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,17 @@ Truth Value Testing
3838 pair: Boolean; operations
3939 single: false
4040
41- Any object can be tested for truth value (with the exception of the
42- :exc: `NotImplemented ` object), for use in an :keyword: `if ` or
41+ Any object can be tested for truth value, for use in an :keyword: `if ` or
4342:keyword: `while ` condition or as operand of the Boolean operations below.
4443
4544.. index :: single: true
4645
4746By default, an object is considered true unless its class defines either a
4847:meth: `~object.__bool__ ` method that returns ``False `` or a
4948:meth: `~object.__len__ ` method that
50- returns zero, when called with the object. [1 ]_ Here are most of the built-in
49+ returns zero, when called with the object. [1 ]_ If one of the methods raises an
50+ exception when they are called, the exception is propagated and the object does
51+ not have a truth value. Here are most of the built-in
5152objects considered false:
5253
5354.. index ::
You can’t perform that action at this time.
0 commit comments