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 mark.dickinson
Recipients mark.dickinson, pablogsal, rhettinger, skrah, steven.daprano, tim.peters
Date 2019-02-19.10:41:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's an example of some code in the standard library that would have benefited from the availability of `pow(x, n, m)` for arbitrary negative n:

    if self._exp >= 0:
        exp_hash = pow(10, self._exp, _PyHASH_MODULUS)
        exp_hash = pow(_PyHASH_10INV, -self._exp, _PyHASH_MODULUS)


    _PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS)

With the proposed addition, that just becomes `pow(10, self._exp, _PyHASH_MODULUS)`, and the `_PyHASH_10INV` constant isn't needed any more.
Date User Action Args
2019-02-19 10:41:11mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, steven.daprano, skrah, pablogsal
2019-02-19 10:41:11mark.dickinsonsetmessageid: <>
2019-02-19 10:41:11mark.dickinsonlinkissue36027 messages
2019-02-19 10:41:11mark.dickinsoncreate