Then may be we could enhance "filter" or introduce some alias? Why we have "filterfalse" and don't have "filtertrue"?
Thanks!
Stepan Dyatkovskiy
14.09.2021, 22:20, "Chris Angelico" <ros...@gmail.com>:
On Wed, Sep 15, 2021 at 4:58 AM Tim Peters <tim.pet...@gmail.com> wrote:
Or perhaps the `compress()` implementation could grow internal
conditionals to use a different algorithm if the second argument is
omitted. But that would be a major change to support something that's
already easily done in more than one more-than-less obvious way.
At which point it'd be basically just turning compress(iter, None)
into filter(None, iter) and we gain nothing. Agreed. So this proposal
has minimal value and enough wrinkles to make it highly unappealing.
ChrisA
_______________________________________________
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/YEUVVUX4D7WOP7AGPOBF5R3UPCDOEKA4/
Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ 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/6TJKQPINIOABX5IPFQXSTHVMYCJZ6PU7/ Code of Conduct: http://python.org/psf/codeofconduct/