Luis Norambuena@programming.devM to Python@programming.devEnglish · 6 hours agoPython's pathlib modulewww.pythonmorsels.comexternal-linkmessage-square8fedilinkarrow-up18arrow-down10file-text
arrow-up18arrow-down1external-linkPython's pathlib modulewww.pythonmorsels.comLuis Norambuena@programming.devM to Python@programming.devEnglish · 6 hours agomessage-square8fedilinkfile-text
minus-squareledslinkfedilinkarrow-up2·2 hours 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-up2·1 hour 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.