Luis NorambuenaM to PythonEnglish · 1 month agoPython's pathlib modulewww.pythonmorsels.comexternal-linkmessage-square10fedilinkarrow-up121arrow-down10file-text
arrow-up121arrow-down1external-linkPython's pathlib modulewww.pythonmorsels.comLuis NorambuenaM to PythonEnglish · 1 month agomessage-square10fedilinkfile-text
minus-squareleds@feddit.dklinkfedilinkarrow-up8·1 month agoIt makes the code so much more clean and readable since you’re dropping multiple levels of brackets , for example os.path.join( a, b, os.path.dirname(c)) Becomes a / b / c.parent I really like it
minus-squareDiplomjodler@lemmy.worldlinkfedilinkarrow-up3arrow-down1·1 month agoI always hated os.path. pathlib is just so much better.
It makes the code so much more clean and readable since you’re dropping multiple levels of brackets , for example
os.path.join( a, b, os.path.dirname(c))
Becomes
a / b / c.parent
I really like it
I always hated os.path. pathlib is just so much better.