Note that the convention for importing
pathlibis to runfrom pathlib import Path, since otherwise we’d have to enterpathlib.PatheverywherePathshows 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