How find all childrens values of a nested dictionary, fast!

John Ladasky ladasky at
Sat Nov 6 05:06:14 CET 2010

On Nov 4, 10:21 am, de... at (Diez B. Roggisch) wrote:
> macm < at> writes:

>     for value in d.values():
>         if isinstance(value, dict):

I'm not a Python guru, but... do you care that you're breaking duck
typing here?  I've had other programmers warn me against using
isinstance() for this reason.  Yes, it's part of the Python language,
but some people wonder whether it should be there.

More information about the Python-list mailing list