]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44019: Implement operator.call(). (GH-27888)
authorAntony Lee <anntzer.lee@gmail.com>
Fri, 24 Sep 2021 15:22:49 +0000 (17:22 +0200)
committerGitHub <noreply@github.com>
Fri, 24 Sep 2021 15:22:49 +0000 (16:22 +0100)
commit6587fc60d447603fb8c631d81d9bb379f53c39ab
treec52c3172f8845e2cb51eed4338436c9e6f58965a
parent8d8729146f21f61af66e70d3ae9501ea6bdccd09
bpo-44019: Implement operator.call(). (GH-27888)

Having `operator.call(obj, arg)` mean `type(obj).__call__(obj, arg)` is
consistent with the other dunder operators.  The semantics with `*args,
**kwargs` then follow naturally from the single-arg semantics.
Doc/library/operator.rst
Doc/whatsnew/3.11.rst
Lib/operator.py
Lib/test/test_operator.py
Misc/NEWS.d/next/Library/2021-08-22-13-25-17.bpo-44019.BN8HDy.rst [new file with mode: 0644]
Modules/_operator.c