On Monday, June 22, 2015 at 6:40:24 PM UTC-7, William wrote: > > What about something explicit, e.g., > > A.add_inplace(B) > > which would mutate A and be very clear and explicit. I actually > expected something like that to exist, but found it doesn't. >
There's a performance benefit in using __iadd__ for the interface: slot methods are more quickly looked up than regular methods. Also, if A is immutable, then an explicit mutating operation would be uncalled for. If A is mutable then we can just implement __iadd__ without concern for reference counts. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.