[Steven D'Aprano <st...@pearwood.info>] > What do you think of my suggestion that we promote the itertools recipe > "take" into a function? > > https://mail.python.org/archives/list/python-ideas@python.org/message/O5RYM6ZDXEB3OAQT75IADT4YLXE25HTT/
That it's independent of whether `first()` should be added. I would _much_ rather write - and read: a = first(iterable, default) than a = take(1, iterable, default)[0] for much the same reasons I'd much rather write and read "2" than "int(10 / 5)" ;-) But, as stated before, I'm not a minimalist when it comes to itertools. In turn, I'd much rather write & read`take(n, iterable, default) than the stuff it takes to plug in "enough" defaults, when needed, without it. _______________________________________________ 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/QO75UXCOC67Y4C2PXBKXHP7P34VCVVOS/ Code of Conduct: http://python.org/psf/codeofconduct/