Seems like itertools recipes already have "all_equal" function. What do you think about moving it from recipes to itertools? I suggest a C implementation with optimisations for builtin collections.

2016-10-06 18:42 GMT+03:00 Chris Angelico <>:
On Fri, Oct 7, 2016 at 2:23 AM, Steven D'Aprano <> wrote:
> +0.3 to adding it the standard library.
> +0.1 to adding it to built-ins
> -0.1 on adding it to built-ins under the name "equal", as that will
> confuse too many people.

I'll go further: -0.5 on adding to built-ins. +0.5 on adding it to
itertools or the itertools recipes.

Python-ideas mailing list
Code of Conduct: