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

196

16423 readers
1924 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] frezik@midwest.social 1 points 11 months ago (7 children)

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

[–] stebo02@sopuli.xyz 2 points 11 months ago (1 children)

I'd say this is pretty readable

[–] frezik@midwest.social 1 points 11 months ago (1 children)

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

[–] stebo02@sopuli.xyz 1 points 11 months ago (1 children)

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

[–] frezik@midwest.social 1 points 11 months ago (1 children)

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

[–] stebo02@sopuli.xyz 2 points 11 months ago

or you're doing this a million times

load more comments (5 replies)