Luis NorambuenaM to [email protected]English • 1 month agoPython's pathlib modulewww.pythonmorsels.comexternal-linkmessage-square9fedilinkarrow-up117arrow-down10file-text
arrow-up117arrow-down1external-linkPython's pathlib modulewww.pythonmorsels.comLuis NorambuenaM to [email protected]English • 1 month agomessage-square9fedilinkfile-text
minus-squareDiplomjodlerlink2•1 month agoThey could have chosen a better operator. But the functionality is fantastic. Makes working with paths so much easier. And you can even use slashes on windows paths.
minus-square@[email protected]linkfedilink8•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
They could have chosen a better operator. But the functionality is fantastic. Makes working with paths so much easier. And you can even use slashes on windows paths.
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.