Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 1 year agoBrace Stylesh.itjust.worksimagemessage-square90linkfedilinkarrow-up11.06Karrow-down112
arrow-up11.05Karrow-down1imageBrace Stylesh.itjust.worksSjmarf@sh.itjust.works to Programmer Humor@programming.dev · 1 year agomessage-square90linkfedilink
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up23·1 year agoYAML makes you appreciate Python’s 4 spaces indentation.
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up12·1 year agoI thought python allowed whatever indentation you wanted as long as it’s consistent?
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up19·1 year 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-up8·1 year agoIt does, but most style guides and autoformatters will use 4
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