GH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)

(cherry picked from commit 3d3a86ed40)

Co-authored-by: Jonathan Oberländer <github@l3vi.de>
This commit is contained in:
Miss Islington (bot) 2022-08-29 00:13:28 -07:00 committed by GitHub
parent 915d12834f
commit ca7e78dc3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1122,7 +1122,7 @@ subject value:
These classes accept a single positional argument, and the pattern there is matched These classes accept a single positional argument, and the pattern there is matched
against the whole object rather than an attribute. For example ``int(0|1)`` matches against the whole object rather than an attribute. For example ``int(0|1)`` matches
the value ``0``, but not the values ``0.0`` or ``False``. the value ``0``, but not the value ``0.0``.
In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens: In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens: