The problem with pathlib
is that it normalizes away critical information so can't be used in many situations.
./path
should not be path
should not be path/
.
Also the article is wrong about "Path('some\\path')
becomes some/path
on Linux/Mac."
The
default
handling is pretty important.What I find more interesting are 1. the two-argument form of
iter
, and 2. the__getitem__
auto-implementation that causes there to be two incompatible definitions ofIterable
.(btw your comments are using accidental formatting; use backticks:
__next__
)