[issue38237] Expose meaningful keyword arguments for pow()

Raymond Hettinger report at bugs.python.org
Fri Sep 20 13:21:42 EDT 2019


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

Current signature:

    pow(x, y, z=None, /)


Proposed signature:

    pow(base, exp, mod=None)


Benefits:

* Meaningful and self-explanatory parameters in tooltips

* Optionally clearer calls for the three argument form:

     pow(2, 5, mod=4)

* More usable with partial():

     squared = partial(pow, exp=2)

----------
components: Library (Lib)
keywords: easy (C)
messages: 352876
nosy: mark.dickinson, rhettinger
priority: normal
severity: normal
status: open
title: Expose meaningful keyword arguments for pow()
type: enhancement
versions: Python 3.9

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


More information about the Python-bugs-list mailing list