PATCH: Augmented assignment
Carel Fellinger
cfelling at iae.nl
Fri Jun 9 21:07:52 EDT 2000
Thomas Wouters <thomas at xs4all.net> wrote:
> As promised, here is my patch to add augmented assignment (+=, -= and
> family) to Python. It's still Work In Progress, and probably requires a
> rewrite of some magnitude before Guido will accept it.
Great! Though I'll probably only use it once it's part of the main distro:(
> The 'ad' in __add_ad__ is what Guido proposed, and I have to say I dont
> particularly like it. Making it '__iadd__' or perhaps '__inplace_add__'
> seems more obvious, and more in keeping with '__radd__'. But perhaps Guido
> meant something entirely different from this patch.
When Guido wrote this I had the urge to reply, but as he stated he wouldn't
read any follow-ups I let it pass. But now it's here again, this ugly use
of abbreviations, so here I go...
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:)
--
groetjes, carel
More information about the Python-list
mailing list