Steven D'Aprano added the comment:
Just use
if a == b == 1:
Comparisons can be chained arbitrarily.
https://docs.python.org/3/reference/expressions.html#comparisons
--
nosy: +steven.daprano
resolution: -> rejected
stage: -> resolved
status: open -> closed
Eric V. Smith added the comment:
I think this is a rarely needed operation. I looked through a few tens of
thousand lines of my code and couldn't find anywhere it would be used.
Plus, you could write it yourself, so I don't see the advantage of it being
part of the language or standard
New submission from Billy :
A new `both()` operator for matching multiple variables to one at the same time.
Currently,
```py
if a == 1 and b == 1:
...
```
With a `both()` operator, it can be done as follows (concept):
```py
if both(a, b) == 1:
...
```
Why?
-> With the increasing