PEP 479 introduced this idea that basically boils down to raising your exceptions only when you mean it.
Specifically: generators only raise StopIteration when they return/exit/terminate. And they prevent the user from raising it under other circumstances. Can we call this "antichecked exceptions"? Generators specifically check for StopIteration raised in undesired circumstances, and make sure they get wrapped. This is a form of runtime checking, so the "checked" part of the name makes sense. But this is unlike "checked exceptions", like those in java, that mostly just encourage uhh silently ignoring the exception? (And those are *statically* checked anyway...) So the prefix "anti" distinguishes it from that. Obviously this name is meant to be more broad than just the implementation of generators. (We made a pypi package that tries to expand on the concept.) But, thoughts? Naming things is powerful. (Is this the wrong list for this? Uhh like it's a name idea for a thing in python? But uhh... it's not so much a change proposal? Except to refer to it by this new name? But anyway...)
_______________________________________________ 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/PQKWKRMOHDOOEV5Q4HDT7FOVQO4MRHAG/ Code of Conduct: http://python.org/psf/codeofconduct/