[Python-ideas] PEP 428 - object-oriented filesystem paths

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 9 07:08:18 CEST 2012


Nick Coghlan wrote:
> Huh? It's a tree structure. A subpath lives inside its parent path,
> just as subnodes are children of their parent node.

You're confusing the path, which is a name, with the
object that it names. It's called a path because it's
the route that you follow from the root to reach the
node being named. To reach a subnode of N requires
following a *longer* path than you did to reach N.
There's no sense in which the *path* to the subnode
is "contained" within the path to N -- rather it's
the other way around.

-- 
Greg




More information about the Python-ideas mailing list