![](https://secure.gravatar.com/avatar/cdc87637918eccd37ca88e9079e73705.jpg?s=120&d=mm&r=g)
It's hard to overstate how "normal" a non-match is. A typical program might examine thousands of strings to identify the ten that match a pattern. Exceptions shouldn't be used for cases that are in no way exceptional. On Sun, Oct 22, 2023, 7:27 PM Greg Ewing <gcewing@snap.net.nz> wrote:
On 23/10/23 1:36 am, Juancarlo Añez wrote:
The *re* module is a black swan, because most of stdlib raises exceptions on invalid arguments or not being able to deliver.
Most of the time, failure to match an re is not a programming error. Often it's perfectly normal. Sometimes it's the result of invalid user input, but that's the fault of the user, not the programmer.
-- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@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/4JNKSU... Code of Conduct: http://python.org/psf/codeofconduct/