3 ms·
"python doesnt offer a rich standard library" Python is usually considered one of the richest standard libraries out there. Yes, the is no standard way to get
by nhumrich 7y ago
"python doesnt offer a rich standard library"
Python is usually considered one of the richest standard libraries out there.
Yes, the is no standard way to get this one edgecase, but every language has warts and things like that. It sounds like you are just looking for an excuse to hate on Python.
- tanin 7y ago> but every language has warts and things like that Sure, but we are talking about the brevity of a language. The richness of the standard library directly impacts brevity. So, Ruby would have been a better representative (for brevity) of a high-level dynamic-typed language. > the is no standard way to get this one edgecase I don't think `.first` is an edge case. It is used fairly often. One example that I can think of right now is when you want to fetch the first row from MySQL. MySQL returns an array, and you would need `.first` to get the first row or null. > It sounds like you are just looking for an excuse to hate on Python Not at all. While I don't prefer Python, I recognize there's a downside to a richer standard library. The language becomes more complex; harder to learn. Richest is relative. If we consider Python against every other programming language, then, yes, it's ONE of the richests. If we consider Python vs. Ruby vs. Scala, I doubt Python would be considered as richer or richest. For example, Scala offers a lot of ways to process a list like foldLeft, foldRight, unzip, headOption, lastOption, flatMap, groupBy, and many methods around Map, Set, and etc. There are many examples where Ruby version would result in shorter code like `array.delete_if` and etc. Python probably doesn't offer many of these methods.
- zapzupnz 7y ago> It sounds like you are just looking for an excuse to hate on Python. That's a big claim to make based on a couple of assertions that are neither about the quality of Python as a language nor the quality of its standard library, merely observations and comparisons. Are you sure it's not you who is upset to see Python 'attacked' (for lack of a better term) in any way?