[Python-Dev] Why is nb_inplace_power ternary?
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Feb 9 00:08:32 CET 2007
Martin v. Löwis wrote:
> It is the implementation of
>
> foo **= bar
>
> (and that's its only use), so it ought to be binary.
Maybe it's so that a type can plug the same implementation
into both nb_pow and nb_inplace_pow. Although the same
effect could be achieved by just leaving nb_inplace_pow
null, so I suppose that's not necessary.
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.
--
Greg
More information about the Python-Dev
mailing list