[Python-Dev] Why is nb_inplace_power ternary?
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Feb 15 02:20:37 CET 2007
Martin v. Löwis wrote:
> I think this would violate the policy that a mutating function shouldn't
> give the object being modified as the result
Well, it's a necessary violation, given the way the inplace
methods work. And it doesn't *necessarily* return the same
value, it might return a new object. So the return value
conveys useful information, unlike with list.sort() et al.
--
Greg
More information about the Python-Dev
mailing list