[issue38237] Expose meaningful keyword arguments for pow()

Serhiy Storchaka report at bugs.python.org
Fri Sep 20 14:37:05 EDT 2019


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

You can use a lambda instead of partial:

    squared = lambda x: pow(x, 2)

Proposed names look meaningful. But after adding support of keyword arguments please compare performance of the old and the new functions. I expect that the difference will be small, but we need to check.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list