Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 6 months agoBrace Stylesh.itjust.worksimagemessage-square62fedilinkarrow-up157arrow-down10
arrow-up157arrow-down1imageBrace Stylesh.itjust.worksSjmarf@sh.itjust.works to Programmer Humor@programming.dev · 6 months agomessage-square62fedilink
minus-squaremariusafa@lemmy.sdf.orglinkfedilinkarrow-up3·6 months agoLiterally me every time I want to program something slightly complex in Python.
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up1·6 months agoYAML makes you appreciate Python’s 4 spaces indentation.
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up1·6 months agoI thought python allowed whatever indentation you wanted as long as it’s consistent?
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up2·6 months agopep8 calls for 4 space but it is a guidance not a rule. Google internal style guide recommend(ed?) 2 spaces to accomodate the line length limit.
minus-squarezalgotext@sh.itjust.workslinkfedilinkarrow-up1·6 months agoIt does, but most style guides and autoformatters will use 4
minus-squareℍ𝕂-𝟞𝟝@sopuli.xyzlinkfedilinkEnglisharrow-up1·6 months agoPython is one of the few languages with an official style guide, I think that guide says 4 spaces.
minus-squareSimulation6@sopuli.xyzlinkfedilinkarrow-up0·6 months ago4 spaces? Hard core Python programmers must have a callus on their thumbs.
minus-squareBeardedGingerWonder@feddit.uklinkfedilinkEnglisharrow-up1·6 months agoJust assign tab to 4 spaces.
minus-squareKojichan@lemmy.worldlinkfedilinkarrow-up0·6 months agoI’d love to see your .editorconfig. … … What’s that in your project root? …pom.xml? Misread that at first as porn.xml.
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up1·6 months agoI’m not the OG on this, just an old reddit post I remembered https://old.reddit.com/r/ProgrammerHumor/comments/9fhvyl/writing_yaml/
Literally me every time I want to program something slightly complex in Python.
It’s just YAML…
YAML makes you appreciate Python’s 4 spaces indentation.
I thought python allowed whatever indentation you wanted as long as it’s consistent?
pep8 calls for 4 space but it is a guidance not a rule.
Google internal style guide recommend(ed?) 2 spaces to accomodate the line length limit.
It does, but most style guides and autoformatters will use 4
Python is one of the few languages with an official style guide, I think that guide says 4 spaces.
Tabs!
deleted by creator
4 spaces? Hard core Python programmers must have a callus on their thumbs.
Just assign tab to 4 spaces.
I’d love to see your .editorconfig.
…
…
What’s that in your project root? …pom.xml? Misread that at first as porn.xml.
I’m not the OG on this, just an old reddit post I remembered
https://old.reddit.com/r/ProgrammerHumor/comments/9fhvyl/writing_yaml/