(no title)
mvhvv | 3 years ago
I can see stability as a knock against Python, but outside of 2 vs 3 the only breaking changes I've really had to deal with were relatively short term issues with third party libs.
mvhvv | 3 years ago
I can see stability as a knock against Python, but outside of 2 vs 3 the only breaking changes I've really had to deal with were relatively short term issues with third party libs.
hzhou321|3 years ago
A few examples:
Perl (flexible/optional function call interface)
Python (the insistence of function call parenthesis) Perl (direct string substitution thanks to sigils) Python (a few formats, keep searching for the perfect ones) Perl (a core set of shell like patterns) Python Perl (good lexical scopes) Python Perl (a set of defaults balacing the succinctness and readability) Python Perl's philosophy is "There is more than one way to do it", pick the way that makes most sense to you.Python's philosophy is "There should be one-- and preferably only one --obvious way to do it", but obviousness is subjective to some, and for the rest, you need learn/search/train the "one" way.
mvhvv|3 years ago
I agree scope leakage is a major stumbling block with Python for sure, but it only occurs with control-flow so rarely causes actual issues once you're aware of it. Aside from that my biggest qualms with Python are the typesystem and whitespace for scoping, but those two don't cause much trouble for typical scripting purposes.
And, for what it's worth, Python's f-strings have been the go-to string formatting approach since 2016 so your example becomes something like:
Which is doubly nice because you can also use format specifiers and arbitrary expressions like so: