Take a look at the design rationale for the new __matmul__ magic method. It's not for the standard library, it's for the community.
But you can also see that Guido has been into types lately. He's been pushing the development of mypy and the new optional type system.
Rails is amazing and I personally love it. But it's not the only thing Ruby is good for.
I dislike the many inconsistencies in Python. You mentioned one. Others: sort vs sorted (destructive vs non destructive). Also: not being able to chain methods because many don't return a value. (Scheme, Elixir or even Ruby are imho much more elegant.)
But all in all Python is a very useful programming language with a rich eco system.
https://docs.python.org/2/faq/design.html#why-doesn-t-list-s...
Nevertheless I find this here much more elegant:
data.sort.tail.first # or this data.append(7).append(3)
More elegant than this:
sorted(data)[1:][0]
data.append(7) # and then
data.append(3)
I love method chaining in Elixir or Javascript. In Python I have to create temp variables here and there to capture / further process intermediate results.
Having said that: Python has it's strengths. I use it more than any other programming language.
if (x=42) {}
Has burned many people. Append having a useful return is comparable, though probably not as much of a trap.> sorted(data)[1:][0]
I don't want to get into the weeds, but shouldn't that just be
sorted(data)[1]
Or if you like unpacking for clarity first, second = sorted(data)[:2]
?
Also many things about python that I don't like such as `len` being a function rather than a method on a list are very trivial when coming from a language like C which has hordes of tiny inconsistencies.
The whitespace thing in python is pretty gimmicky but does also hold a certain amount of pedantic appeal.