[Python-Dev] Why is nb_inplace_power ternary? (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Fri Feb 9 09:51:04 CET 2007
- Previous message: [Python-Dev] Why is nb_inplace_power ternary?
- Next message: [Python-Dev] Why is nb_inplace_power ternary?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Why is nb_inplace_power ternary?
- Next message: [Python-Dev] Why is nb_inplace_power ternary?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]