[Python-checkins] bpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504) (GH-30509)

rhettinger webhook-mailer at python.org
Sun Jan 9 21:32:01 EST 2022


https://github.com/python/cpython/commit/2e6798f35260ff90129861ef1f289ac40c0396c2
commit: 2e6798f35260ff90129861ef1f289ac40c0396c2
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2022-01-09T18:31:51-08:00
summary:

bpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504) (GH-30509)

files:
M Doc/tutorial/datastructures.rst

diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index e42b380db3d23..927a6722ca251 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -659,10 +659,12 @@ More on Conditions
 The conditions used in ``while`` and ``if`` statements can contain any
 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.  All comparison operators have
-the same priority, which is lower than that of all numerical operators.
+
+The comparison operators ``in`` and ``not in`` are membership tests that
+determine whether a value is in (or not in) a container.  The operators ``is``
+and ``is not`` compare 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``.



More information about the Python-checkins mailing list