On 10/06/2016 06:45 AM, Filipp Bakanov wrote:

For now there are many usefull builtin functions like "any", "all",
 etc. I'd like to propose a new builtin function "equal". It should
 accept iterable, and return True if all items in iterable are the
 same or iterable is emty.

That's quite popular problem, there is a discussion of how to
perform it on stackoverflow - all suggestions are either slow
 or not very elegant.

What do you think about it?

I don't know if it's common enough to warrant being a built-in, but I know I've 
needed it several times, and wrote my own.

--
~Ethan~
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to