|
|
|
|
|
by SoftwareMaven
3654 days ago
|
|
But that's a function of API, not the language itself. Django (and most ORMs, I believe) support that kind of behavior: MyTable.objects.
filter(some_row__gt=5).
exlude(other_row='q').
order_by('other_row')
The Python iterable APIs have decided to use nesting rather than chaining, but you can still have an underscore-like API: https://github.com/serkanyersen/underscore.pyThe bigger problem remains: lambda functions are hideous in Python. map() will forever be ugly if you try to use it in the same way it is used in most functional languages. |
|