Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 2年前Brace Stylesh.itjust.worksimagemessage-square63linkfedilinkarrow-up167arrow-down10
arrow-up167arrow-down1imageBrace Stylesh.itjust.worksSjmarf@sh.itjust.works to Programmer Humor@programming.dev · 2年前message-square63linkfedilink
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up1·2年前YAML makes you appreciate Python’s 4 spaces indentation.
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up1·2年前I thought python allowed whatever indentation you wanted as long as it’s consistent?
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up2·2年前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.
minus-squarezalgotext@sh.itjust.workslinkfedilinkarrow-up1·2年前It does, but most style guides and autoformatters will use 4
minus-squareℍ𝕂-𝟞𝟝@sopuli.xyzlinkfedilinkEnglisharrow-up1·2年前Python is one of the few languages with an official style guide, I think that guide says 4 spaces.
minus-squareSimulation6@sopuli.xyzlinkfedilinkarrow-up0·2年前4 spaces? Hard core Python programmers must have a callus on their thumbs.
minus-squareBeardedGingerWonder@feddit.uklinkfedilinkEnglisharrow-up1·2年前Just assign tab to 4 spaces.
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.