On Fri, Mar 11, 2022, 2:39 PM wfdc <w...@protonmail.com> wrote: > > Not every one line function needs to be a method on a built-in type. > > Not every one line function needs to *not* be a method on a built-in type. > See tuple's count method for an example. > Again, if users find themselves re-implementing the same utility function > over and over again across different projects it's a good sign that such a > function should be part of the standard library. >
I've used Python for 23+ years now. I've had occasion where I'd use this methods maybe in the low-tens of times. I'd call the purpose rare at best. I'm not going to list other one-liners that I'd also not want, but are less rare. There are various, but none I'd advocate adding rather than writing when I need them.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/4IBAA4ZADDSEWIOCKOJT5YQPVVJ4XNZM/ Code of Conduct: http://python.org/psf/codeofconduct/