[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 2e6798f35260ff90129861ef1f289ac40c0396c2 by Miss Islington (bot) in branch '3.10': bpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504) (GH-30509) https://github.com/python/cpython/commit/2e6798f35260ff90129861

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28713 pull_request: https://github.com/python/cpython/pull/30509 ___ Python tracker _

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset d24cd49acb25c36db31893b84d0ca4fe2f373b94 by Raymond Hettinger in branch 'main': bpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504) https://github.com/python/cpython/commit/d24cd49acb25c36db31893b84d0ca4fe2f37

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +28709 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30504 ___ Python tracker __

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-06 Thread Jan
Jan added the comment: Sounds reasonable. -- resolution: works for me -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Container is correct. Containers are defined as being anything that supports the "in" and "not in" operators. That includes sequences (str, list, tuple, bytes, bytearray), mappings (dict, ChainMap, defaultdict), and sets (frozenset and set). It doesn't

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Jan
Jan added the comment: I really like this solution because it mentions the buzz word "membership". But I would change "container" to "sequence" because the term "container" doesn't appear in chapter 5, "sequence" on the other hand multiple times. My proposal: "The comparison operators `in` a

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: It may seem weird, but a "membership operator" is a kind of "comparison operator".ยน They can even participate in chaining, 'a < b in s < c` is equivalent to `(a < b) and (b in s) and (b < c)`. I'm propose this new wording to mention the concept of "membe

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list m

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Jan
New submission from Jan : In chapter 5.7 in the official Python tutorial (see: https://docs.python.org/3/tutorial/datastructures.html), there is the following paragraph: "The comparison operators in and not in check whether a value occurs (does not occur) in a sequence. The operators is and