Couple questions...

Is it a problem to use a defaultdict vs a stdlib dict? The benefit is just
simplifying the need for checking if a key exists, so that you can freely
access it and have it create a child data structure as needed. But in that
example they are using files as leaf items and storing them in a list. I
assume you don't want that, so that you can have arbitrarily deep
hierarchies, so it would end up with leaf items having empty dictionaries,
and dealing only in keys.

What are you access patterns? An arbitrarily nested dictionary is a bit
complex. Are you just trying to see if something has changed between two
sets of data? Are you trying to do various searches within this data
structure?

Justin

On Wed, Dec 14, 2016 at 11:44 PM river bell <[email protected]> wrote:

>
> edit:
>
> I almost had a solution here :
> http://stackoverflow.com/questions/8484943/construct-a-tree-from-list-os-file-paths-python-performance-dependent?noredirect=1&lq=1
> But it is using default dict rather than a normal nested dictionary.
> And i am not able to convert this nested defaultdict to a normal dict.
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/441a0e3a-b444-4d05-a867-83757e4afa4d%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/441a0e3a-b444-4d05-a867-83757e4afa4d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0eqrLE%3DpYsOwzeLzWXuseK9ZJWwtNyOeiFOCdKJguMFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to