On Tue, Oct 12, 2021 at 11:47 PM Steven D'Aprano <st...@pearwood.info> wrote: > > Shouldn't your safe_map raise RuntimeError rather than ValueError? > That's what PEP 479 does *wink* > > https://www.python.org/dev/peps/pep-0479/ >
If I'm explicitly choosing the exception to raise, ValueError seems better, although I'd also see TypeError as plausible. But the point isn't *which* exception is raised; the point is that it won't simply early-abort, as the naive one does. I never intended to replicate PEP 479 semantics here, just the equivalent level of safety against bizarre behaviours. Thanks for nitpicking, though. In return, I'll point out that I never actually created anything called safe_map :) 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/GR7DCZ5PDHJOZLOFJ3B666FGZZOG5ZLF/ Code of Conduct: http://python.org/psf/codeofconduct/