> > Does it make sense to draw some sort of parallel between next(myiterator, > default="whatever") and mylist.pop(default="whatever")? They exhaust the > iterator/list then start emitting the default argument (if provided). >
Yep that's what I just did in my previous mail. """ I think the same way about set.pop, list.pop. About .index I agree adding default= would make sense but that's not exactly the same thing as the others. """ Being picky: "TypeError: next() takes no keyword arguments", that's next(myierator, "whatever") ;)
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/