Have a .realpath
classmethod in pathlib.Path (original) (raw)
sinoroc (sinoroc) July 28, 2020, 8:09pm 19
I also found myself in a situation where it wasn’t entirely clear what resolve()
is supposed to do.
Would something like the following be meaningful, feasible?
Path.resolve(
strict: bool = False,
make_absolute: bool = True,
resolve_symlinks: bool = True,
expand_user: bool = False,
expand_environment_variables: bool = False,
# some more, maybe platform specific things
# (Windows mount points, etc.)
)
Give the user the choice.