3 ms·
> Python's indentation for blocks isn't holding up to the test of time. Citation needed. Python popularity seems to be only growing up and in all kinds of indu
by aprdm 8y ago
> Python's indentation for blocks isn't holding up to the test of time.
Citation needed. Python popularity seems to be only growing up and in all kinds of industries. Hard to find somewhere where python hasn't touched yet.
Also, as you mentioned, is pretty standard to have some sort of flake8 as part of your CI and it would certainly detect problems with bad identation that would cause code issues.
If the basic flake8 tests pass then should certainly have some unit / integration tests as part of your merge request...
Now a days there are even things like black [https://github.com/ambv/black https://github.com/ambv/black] that does auto formatting just like gofmt.
- Steltek 8y agoA quick tour through history will show that minor language defects have never been a showstopper for adoption. Python is popular in spite of it's minor irritations (and all languages have minor irritations in some form). Further, all the human conditions that resulted in bad code style before are still present and showing through in Python codebases. Namely organizations with loose standards or inadequate tooling where language problems get magnified. This is remarkably evident in companies that used to be 100% C/C++ or Java shops and never quite figured out unit tests.
- Sean1708 8y ago> does auto formatting just like gofmt It does auto formatting, but it doesn't do auto formatting just like gofmt. An auto formatter can't do anything with this block if check_based_on_value: if value < 0.3: # do something elif 0.3 <= value < 0.7: # do something else else: # do a third thing for example.