Pre-PEP: Dictionary accumulator methods

Paul Rubin http
Sat Mar 19 21:30:15 CET 2005

"El Pitonero" <pitonero at> 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