Note that the convention for importing
pathlib
is to runfrom pathlib import Path
, since otherwise we’d have to enterpathlib.Path
everywherePath
shows up in our code. Not only is this extra typing redundant, but it’s also redundant.
Al Sweigart, Automate the Boring Stuff with Python: Practical Programming for Total Beginners, 2nd ed., San Francisco, 2020, p. 203