Message364400
It is hard to find a builtin which could be easy and clearly implemented in Python (it means no use of dunder methods). Maybe sorted()?
def sorted(iterable, /, *, key=None, reverse=False):
"""Emulate the built in sorted() function"""
result = list(iterable)
result.sort(key=key, reverse=reverse)
return result
Although I think that this use case is less important. The primary goal of the feature is mentioned at the end of the section -- easy way to implement functions which accept arbitrary keyword arguments. |
|
Date |
User |
Action |
Args |
2020-03-17 09:27:49 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, mark.dickinson, lukasz.langa, ammar2, miss-islington, lschoe |
2020-03-17 09:27:49 | serhiy.storchaka | set | messageid: <1584437269.9.0.230643474767.issue38237@roundup.psfhosted.org> |
2020-03-17 09:27:49 | serhiy.storchaka | link | issue38237 messages |
2020-03-17 09:27:49 | serhiy.storchaka | create | |
|