a += b is nominally the same as
a = a + b To make class instances support this behavior the class can implement the __iadd__ special method. See docs.python.org and read about special methods. This notation originated, so far as I know, in the C language. It at least goes back that far. On Mon, May 12, 2014 at 9:22 AM, Malik Rumi <malik.a.r...@gmail.com> wrote: > I saw it here > http://www.slideshare.net/jacobian/the-best-and-worst-of-django on slide > 41. That's a lot to go through, I know, sorry about that. But I googled it > and of course got nothing because Google ignores things like + and = now. > And I know in this particular example he says 'don't do this", I just want > to know what += means or does? Thx. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/f364291f-ae62-4b0b-a2d9-23e3f81a64e4%40googlegroups.com<https://groups.google.com/d/msgid/django-users/f364291f-ae62-4b0b-a2d9-23e3f81a64e4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0te4P1ce9AX%3DA9_xxiYFYC2v8dwJU9OhzUQQ%2BmepyPgCQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.