PATCH: Augmented assignment

Thomas Wouters thomas at xs4all.net
Sat Jun 10 06:08:11 EDT 2000


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 ;-)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list