Should you be using Pathlib?

I've been working in Python for four years - recently I made the conscious choice to use pathlib rather than the more familiar os & os.path.

It's been a great experience - I wrote a short piece (friend link) comparing the two libraries on common workflows & tasks done with file paths.

Should you be using Pathlib?

22 comments · 85% upvoted · other discussions

comments

XIVN1987

It's not worth introducing an external package just to improve a little using experience.

ADGEfficiency [OP]

pathlib is part of the standard library :)