Path as a dictionary tree key? (was Re: PEP on path module for standard library)
exogen at gmail.com
Tue Aug 2 00:06:05 CEST 2005
Ron Adam wrote:
> This give a more general purpose for path objects. Working out ways to
> retrieve path objects from a dictionary_tree also would be useful I
> think. I think a Tree class would also be a useful addition as well.
> Any thoughts on this?
I don't think this would be as useful as you think, for Path objects at
least. Path objects represent *a* path, and building a tree as you have
proposed involves storing much more information than necessary. For
instance, if I have the path /A/B/X, a tree-structured object would
logically also store the siblings of X and B (subpaths of B and A).
Adventurer of the First Order
More information about the Python-list