You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: