Coolest Python recipe of all time

Chris Angelico rosuav at gmail.com
Tue May 3 17:54:12 EDT 2011


On Wed, May 4, 2011 at 2:43 AM, Raymond Hettinger <python at rcn.com> wrote:
> We should have a separate thread for the most practical, best
> documented, least surprising, and most boring recipe ;-)

a += b   # Adds b to a in-place. Polymorphic - works on a wide variety of types.

You didn't say it had to be complicated...

Chris Angelico



More information about the Python-list mailing list