PurePathBase has a few slots and methods that facilitate fast path object generation:
_drv, _root, _tail_cached: roughly, the result of os.path.splitroot() on the path
_str: the normalized path string
_make_child_relpath(): used when walking directories
_from_parsed_parts(): used in parent, parents, with_name(), relative_to()
These features are useful in PurePath, where speed is important, but much less so in PurePathBase, where the clarity of the interfaces and interactions should win out.
It should be possible to move them to PurePath, leaving PurePathBase with only _raw_paths and _resolving slots.
PurePathBase
has a few slots and methods that facilitate fast path object generation:_drv
,_root
,_tail_cached
: roughly, the result ofos.path.splitroot()
on the path_str
: the normalized path string_make_child_relpath()
: used when walking directories_from_parsed_parts()
: used inparent
,parents
,with_name()
,relative_to()
These features are useful in
PurePath
, where speed is important, but much less so inPurePathBase
, where the clarity of the interfaces and interactions should win out.It should be possible to move them to
PurePath
, leavingPurePathBase
with only_raw_paths
and_resolving
slots.