Closed
Description
Two optimizations are possible:
is_absolute()
can pass the unnormalized path toos.path.isabs()
absolute()
on an empty path (orPath.cwd()
) can avoid joining an empty string onto the working directory (thus avoiding a call toos.path.join()
), and short-circuit the string normalization (as the result ofgetcwd()
is fully normalized)