[Python-Dev] Why is nb_inplace_power ternary?
"Martin v. Löwis"
martin at v.loewis.de
Fri Feb 9 09:51:04 CET 2007
Greg Ewing schrieb:
> Might we want to add an in-place version of the 3-arg
> pow() function one day? If so, leaving the third argument
> there could be useful.
What could the syntax for that be?
Instead of writing
x = pow(x, n, 10)
would you write
x pow n = 10
? or perhaps
x ** n = 10
or
x * n *= 10
Also, it would break existing __ipow__ implementations
that only receive two arguments (unless there would be
another __ method introduced).
Regards,
Martin
More information about the Python-Dev
mailing list