Coolest Python recipe of all time
Ian Kelly
ian.g.kelly at gmail.com
Tue May 3 18:10:42 EDT 2011
On Tue, May 3, 2011 at 3:54 PM, Chris Angelico <rosuav at gmail.com> wrote:
> 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.
Too surprising to qualify. For some types it modifies a, while for
others it replaces a.
More information about the Python-list
mailing list