PATCH: Augmented assignment

Carel Fellinger cfelling at iae.nl
Sat Jun 10 18:07:03 EDT 2000


Thomas Wouters <thomas at xs4all.net> wrote:
> On Sat, Jun 10, 2000 at 03:07:52AM +0200, Carel Fellinger wrote:

>> What about __add_is__? This sounds like addish, a kind of add; it resembles
>> its use, plus followed by is; would prevent confusion of where to place the
>> r like in __r_inplace_add__ versus __inplace_radd__; and still is concise:)

> Well, that last bit is a non-issue, at least as far as I'm concerned,
> because an augmented assignment doesn't need a 'right-hand' hook: The
> new hook is called to change the left-hand-side object in-place, and you
> shouldn't expect the right-hand-side object to know how to do that to the
> lhs object. *that* would be confusing ;-)

Au, au, do I feel stupid!
-- 
groetjes, carel



More information about the Python-list mailing list