[docs] [issue28617] Why isn't "in" called a comparison operation?

Serhiy Storchaka report at bugs.python.org
Tue Sep 11 11:04:47 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I think that "types that are :term:`iterable` or implement the :meth:`__contains__` method" is too low-level for this section.

In this section we tell about builtin types. From those the types that support `in` and `not in` are list, tuple, dict, set, frozenset, str, bytes, bytearray, memoryview, and iterator types. We can just enumerate them or use general word. Calling the "sequence types" is not correct, but fortunately all of them are iterable, so that we can say just "iterable types described below". Or enumerate categories of types, as they are named in the below subsections: "iterator types, sequence types, str, binary sequence types, set types and dict", with links to corresponding subsections.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28617>
_______________________________________


More information about the docs mailing list