[Python-Dev] Why is nb_inplace_power ternary? (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Wed Feb 14 20:02:42 CET 2007


Thomas Wouters schrieb:

Sure, and I don't know if anyone will ever want ipow() -- but I've never seen real code use the three-argument pow() either. The fact is that all the in-place modifying hooks return the result (which may or may not be self, and may or may not be mutated) so an in-place three-argument pow() would have to do the same. I would prefer keeping the similarity between ipow and pow, although I don't care if that means keeping the always-unused third argument to ipow (which isn't really in the way, after all) or adding a new hook for the three-argument pow().

It's in the way in the sense that slot_nb_inplace_power discards its third argument silently. That shouldn't happen, so I still prefer removing it throughout. Would you volunteer adding to fix that?

Regards, Martin



More information about the Python-Dev mailing list