mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-43325: Add FAQ entry for identity tests (GH-25168) (GH-25178)
This commit is contained in:
parent
cbfa09b70b
commit
de0b2b1330
2 changed files with 89 additions and 3 deletions
|
@ -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``.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue