Luis NorambuenaM to [email protected]English • 3 months 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 • 3 months agomessage-square9fedilinkfile-text
minus-squareEager EaglelinkEnglish1•3 months agoNice, mypath.open() is a more semantic alternative to open(my path)
minus-squareunalivejoylinkfedilinkEnglish1•3 months agoDon’t forget about the helper functions mypath.read_text() and mypath.write_text(content)
minus-square@[email protected]linkfedilinkEnglish-1•3 months 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.
Nice, mypath.open() is a more semantic alternative to open(my path)
Don’t forget about the helper functions
mypath.read_text()
andmypath.write_text(content)
that’s already in the cheatsheet
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.