suggestion: recursive collections.defaultdict

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Jun 18 14:56:53 EDT 2007


In <1182184918.766497.315040 at k79g2000hse.googlegroups.com>,
tutufan at gmail.com wrote:

> It seems like
> 
>     x = defaultdict(defaultdict(list))
> 
> should do the obvious, but it doesn't.

It *does* the obvious.  Parenthesis after a name means: call this object
*now*.  Any other behavior wouldn't be obvious.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list