On Jun 18, 1:56 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>,
>
> [EMAIL PROTECTED] 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
In <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] 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 'Bl
It seems like
x = defaultdict(defaultdict(list))
should do the obvious, but it doesn't. This seems to work
y = defaultdict(lambda: defaultdict(list))
though is a bit uglier.
--
http://mail.python.org/mailman/listinfo/python-list