Pre-PEP: Dictionary accumulator methods

Paul Rubin http
Sat Mar 19 15:30:15 EST 2005


"El Pitonero" <pitonero at gmail.com> writes:
> What about no name at all for the scalar case:
> 
> a['hello'] += 1
> a['bye'] -= 2

I like this despite the minor surprise that it works even when
a['hello'] is uninitialized.



More information about the Python-list mailing list