[issue44019] operator.call/operator.__call__

Antony Lee report at bugs.python.org
Wed Aug 4 00:24:15 EDT 2021


Antony Lee <anntzer.lee at gmail.com> added the comment:

Actually, upon further thought, the semantics I suggested above should go into `operator.caller` (cf. `operator.methodcaller`), and `operator.call`/`operator.__call__` should instead be defined as `operator.call(f, *args, **kwargs) == f(*args, **kwargs)`, so that the general rule `operator.opname(a, b) == a.__opname__(b)` (modulo dunder lookup rules) remains applicable.

----------

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


More information about the Python-bugs-list mailing list