Hacker News new | ask | show | jobs
by _never_k 2477 days ago
This is the way I feel too. Python is both redundant and inconsistent at a basic level. The APIs for `map`, `filter` and `reduce`, the inversion between `split` and `join`, `sort` vs `sorted` -- it's all very weird. And these aren't advanced features.

When I hear people describe Python as simple and elegant, it feels like they're using a different language than the one I know.

1 comments

Note: in practice, almost no one uses map, filter, and reduce. Those are almost 100% replaced by list and generator comprehensions in code written in the last decade or so.

The difference between split and join is kind of weird, I'll grant. I'm not sure why it was done that way.

`sort` is in place. You're telling an object to order itself: "hey you! Sort yourself!" `sorted` returns a copy of an object, but... sorted. You're asking for the sorted version of that thing.