this post was submitted on 03 Apr 2024
1324 points (98.9% liked)

Science Memes

9984 readers
2238 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.


Sister Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 4 months ago (1 children)

Python forcing end of line and tabs kinda does. Add Black auto-formatter and it's pretty good.

[–] [email protected] 1 points 4 months ago (1 children)

I've seen too many Python devs write out complex statements all on one crammed up line. Including some that are in the main docs.

Enforced whitespace is just one aspect of readable code. There are many others, and Python is no better at enforcing those than any other language.

[–] [email protected] 2 points 4 months ago

That would probably make very long lines and black would automatically add returns to line with proper indentations. But it has a a limit for sure. If you chain many list comprehensions it's going to be a mess.