293
you are viewing a single comment's thread
view the rest of the comments
[-] frezik@midwest.social 34 points 1 year ago

People used to argue that Python was incredibly readable. Then I started seeing shit like this.

[-] stebo02@sopuli.xyz 26 points 1 year ago

I'd say this is pretty readable

[-] frezik@midwest.social 8 points 1 year ago

It jams far too much on one line. Break it up. It's a mistake I see a lot on Python.

[-] stebo02@sopuli.xyz 4 points 1 year ago

but if you do it as a for loop it would be slower

[-] frezik@midwest.social 3 points 1 year ago

Unless you're looping over more than a million elements, that's a poor excuse.

[-] stebo02@sopuli.xyz 5 points 1 year ago

or you're doing this a million times

[-] addie@feddit.uk 16 points 1 year ago

I think that Python has a bit of a 'Microsoft Word' thing on the go. You know how your own docs are completely editable and print fine, but everyone else's are a complete fucking disaster and pressing a single key will screw up the formatting of the whole document? Your own Python code is full of sensible idioms and pragmatic naming conventions, but everyone else's was plainly written while on mushrooms.

[-] lunarul@lemmy.world 12 points 1 year ago

I don't know python, but it's clear what that line does

this post was submitted on 22 Nov 2023
293 points (100.0% liked)

196

16501 readers
2229 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS