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 josh.r
Recipients josh.r, lschoe, rhettinger
Date 2019-02-15.04:47:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550206059.17.0.139062927666.issue35996@roundup.psfhosted.org>
In-reply-to
Content
"One other issue is that the arguments to prod() need not be integers, so a modulus argument wouldn't make sense in those contexts."

The arguments to pow don't need to be integers either, yet the optional third argument is only really relevant to integers.

Not saying we should do this, but we definitely allow optional arguments that are only meaningful for certain input types in other cases.

The best argument for this change I can come up with from other Python functions is the push for an efficient math.comb (#35431); if we didn't want to bother supporting minimizing intermediate values, math.comb could be implemented directly in terms of math.factorial instead of trying to pre-cancel values. But even that's not a strong argument for this, given the relative frequency with which each feature is needed (the binomial coefficient coming up much more often than modular reduction of huge products).
History
Date User Action Args
2019-02-15 04:47:39josh.rsetrecipients: + josh.r, rhettinger, lschoe
2019-02-15 04:47:39josh.rsetmessageid: <1550206059.17.0.139062927666.issue35996@roundup.psfhosted.org>
2019-02-15 04:47:39josh.rlinkissue35996 messages
2019-02-15 04:47:39josh.rcreate