summaryrefslogtreecommitdiffstats
path: root/Python/context.c
diff options
context:
space:
mode:
authorWim Jeantine-Glenn <hey@wimglenn.com>2024-05-29 17:46:20 (GMT)
committerGitHub <noreply@github.com>2024-05-29 17:46:20 (GMT)
commitfcca08ec2f48f4ba5ba1d4690fb39b1efe630944 (patch)
treeb874582eadea61278f502ed0219e92e5b4fd077e /Python/context.c
parentbf4ff3ad2e362801e87c85fffd9e140b774cef26 (diff)
downloadcpython-fcca08ec2f48f4ba5ba1d4690fb39b1efe630944.zip
cpython-fcca08ec2f48f4ba5ba1d4690fb39b1efe630944.tar.gz
cpython-fcca08ec2f48f4ba5ba1d4690fb39b1efe630944.tar.bz2
gh-119594: Improve pow(fraction.Fraction(), b, modulo) error message (#119593)
If one calls pow(fractions.Fraction, x, module) with modulo not None, the error message now says that the types are incompatible rather than saying pow only takes 2 arguments. Implemented by having fractions.Fraction __pow__ accept optional modulo argument and return NotImplemented if not None. pow() then raises with appropriate message. --------- Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Diffstat (limited to 'Python/context.c')
0 files changed, 0 insertions, 0 deletions