File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1266,7 +1266,7 @@ Pattern matching
1266
1266
the pattern matches the subject.
1267
1267
1268
1268
``body `` contains a list of nodes to execute if the pattern matches and
1269
- the result of evaluating the guard expression is truthy .
1269
+ the result of evaluating the guard expression is true .
1270
1270
1271
1271
.. doctest ::
1272
1272
Original file line number Diff line number Diff line change @@ -585,8 +585,8 @@ Here's an overview of the logical flow of a match statement:
585
585
#. If the pattern succeeds, the corresponding guard (if present) is evaluated. In
586
586
this case all name bindings are guaranteed to have happened.
587
587
588
- * If the guard evaluates as truthy or missing, the ``block `` inside `` case_block `` is
589
- executed.
588
+ * If the guard evaluates as true or is missing, the ``block `` inside
589
+ `` case_block `` is executed.
590
590
591
591
* Otherwise, the next ``case_block `` is attempted as described above.
592
592
@@ -637,10 +637,10 @@ The logical flow of a ``case`` block with a ``guard`` follows:
637
637
638
638
#. If the pattern succeeded, evaluate the ``guard ``.
639
639
640
- * If the ``guard `` condition evaluates to "truthy" , the case block is
640
+ * If the ``guard `` condition evaluates as true , the case block is
641
641
selected.
642
642
643
- * If the ``guard `` condition evaluates to "falsy" , the case block is not
643
+ * If the ``guard `` condition evaluates as false , the case block is not
644
644
selected.
645
645
646
646
* If the ``guard `` raises an exception during evaluation, the exception
Original file line number Diff line number Diff line change @@ -1861,7 +1861,7 @@ def test_warning_notimplemented(self):
1861
1861
# be evaluated in a boolean context (virtually all such use cases
1862
1862
# are a result of accidental misuse implementing rich comparison
1863
1863
# operations in terms of one another).
1864
- # For the time being, it will continue to evaluate as truthy , but
1864
+ # For the time being, it will continue to evaluate as a true value , but
1865
1865
# issue a deprecation warning (with the eventual intent to make it
1866
1866
# a TypeError).
1867
1867
self .assertWarns (DeprecationWarning , bool , NotImplemented )
You can’t perform that action at this time.
0 commit comments