Author serhiy.storchaka
Recipients ammar2, lschoe, lukasz.langa, mark.dickinson, miss-islington, rhettinger, serhiy.storchaka
Date 2020-03-17.09:27:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584437269.9.0.230643474767.issue38237@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-03-17 09:27:49serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson, lukasz.langa, ammar2, miss-islington, lschoe
2020-03-17 09:27:49serhiy.storchakasetmessageid: <1584437269.9.0.230643474767.issue38237@roundup.psfhosted.org>
2020-03-17 09:27:49serhiy.storchakalinkissue38237 messages
2020-03-17 09:27:49serhiy.storchakacreate