
Oct. 13, 2021
8:23 a.m.
13.10.21 03:10, Jelle Zijlstra пише:
To get a new operator on a builtin type, you'll have to show that: - It's a common operation; - There's no convenient way to do it already; and - The meaning of the operator is reasonably clear to a reader of the code.
Recent examples of new features that met that bar are dict | in https://www.python.org/dev/peps/pep-0584 <https://www.python.org/dev/peps/pep-0584> and matrix multiply in https://www.python.org/dev/peps/pep-0465/ <https://www.python.org/dev/peps/pep-0465/>.
I think it fails two first criteria. It is not enough common operation and we already did have convenient ways to do it.