This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Antony.Lee
Recipients Antony.Lee, brett.cannon, hrik2001, mark.dickinson, rhettinger, vstinner
Date 2021-09-01.08:03:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
Python2's apply has different semantics: it takes non-unpacked arguments, i.e.

    def apply(f, args, kwargs={}): return f(*args, **kwargs)

rather than

    def call(f, *args, **kwargs): return f(*args, **kwargs)

I agree that both functions can be written in two (or one) line, but the same can be said of most functions in the operator module (def add(x, y): return x + y); from the module's doc ("efficient functions corresponding to the intrinsic operators"), I would argue that the criteria for inclusion are efficiency (operator.call is indeed fast, see the linked PR) and intrinsicness (I don't know if there's a hard definition, but function calling certainly seems intrinsic).
History
Date User Action Args
2021-09-01 08:03:16Antony.Leesetrecipients: + Antony.Lee, brett.cannon, rhettinger, mark.dickinson, vstinner, hrik2001
2021-09-01 08:03:16Antony.Leesetmessageid: <[email protected]>
2021-09-01 08:03:16Antony.Leelinkissue44019 messages
2021-09-01 08:03:16Antony.Leecreate