More flexible type support for math.prod
and math.sumprod
#13501
Labels
stubs: improvement
Improve/refactor existing annotations, other stubs issues
Also related to #11913
Currently,
math.prod
andmath.sumprod
do not properly supportDecimal
,Fraction
,complex
, or possibly other numeric types. This makes it inconvenient to replacebuiltins.sum
withmath.prod
in a straightforward manner.Mypy Playground Link
I believe it should be followed the type stub of
builtins.sum
, but I’m not sure what breaking changes this might cause.The text was updated successfully, but these errors were encountered: