Luis Norambuena@programming.devM to Python@programming.devEnglish · 1 day agoPython's pathlib modulewww.pythonmorsels.comexternal-linkmessage-square10fedilinkarrow-up113arrow-down10file-text
arrow-up113arrow-down1external-linkPython's pathlib modulewww.pythonmorsels.comLuis Norambuena@programming.devM to Python@programming.devEnglish · 1 day agomessage-square10fedilinkfile-text
minus-squareEager Eagle@lemmy.worldlinkfedilinkEnglisharrow-up1·24 hours agoNice, mypath.open() is a more semantic alternative to open(my path)
minus-squareulterno@programming.devlinkfedilinkEnglisharrow-up0arrow-down1·7 hours agoToday I realised, we all prefer semantics matching oriental language semantics. English: Open my path. Same sentence in Hindi semantics would be: My path open.
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up1·23 hours agoDon’t forget about the helper functions mypath.read_text() and mypath.write_text(content)
minus-squareEager Eagle@lemmy.worldlinkfedilinkEnglisharrow-up1·23 hours agothat’s already in the cheatsheet
Nice, mypath.open() is a more semantic alternative to open(my path)
Today I realised, we all prefer semantics matching oriental language semantics.
English: Open my path.
Same sentence in Hindi semantics would be: My path open.
Don’t forget about the helper functions
mypath.read_text()
andmypath.write_text(content)
that’s already in the cheatsheet