bpo-43325: Add FAQ entry for identity tests (GH-25168)

This commit is contained in:
Raymond Hettinger 2021-04-03 19:54:49 -07:00 committed by GitHub
parent 35715d1e72
commit f8775e4f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 89 additions and 3 deletions

View file

@ -661,9 +661,8 @@ operators, not just comparisons.
The comparison operators ``in`` and ``not in`` check whether a value occurs
(does not occur) in a sequence. The operators ``is`` and ``is not`` compare
whether two objects are really the same object; this only matters for mutable
objects like lists. All comparison operators have the same priority, which is
lower than that of all numerical operators.
whether two objects are really the same object. All comparison operators have
the same priority, which is lower than that of all numerical operators.
Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` is
less than ``b`` and moreover ``b`` equals ``c``.