On Wed, Mar 04, 2020 at 11:10:15AM +0000, Jonathan Fine wrote: > We are talking here about an exception message that is generated by core > Python. So there would be some warning of change, namely the review process > for core Python.
You can't call the error message a stable part of the language without forbidding changes to the error message. Essentially, you are asking for changes to error messages to be treated as a breaking change. That includes fixing typos and spelling errors, rewording clumsy phrases and adding extra or better quality information to the message. These are all breaking changes if you expect error messages to be stable. The precise wording of error messages would have to be documented. Not everyone follows the review process for interpreter changes, so changes would have to be listed in those docs, and the "What's New" for each release. In my own code I would never accept a request to freeze error messages. To be frank, I think it would be intolerable. I would never, ever ask the core developers to take on this additional burden. It would also rule out any possibility of having error messages localised to the user's native language. > I agree that there is a problem to be solved here. Perhaps it is easier and > better for core Python to decide to freeze certain messages, than to add a > new exception type. How do you decide which functions should have their error messages frozen, and which do not? Let's suppose you make that decision, and you declare that len(), map(), zip(), itertools.count() and functools.wraps() will have their error message frozen, but the other functions don't. How does that help me when I want to use feature detection to detect a change in the calling parameters to somelibrary.somefunction()? -- Steven _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/IKDOVZ2BSMFI5JB3JWEG7RCSIQSMNWZE/ Code of Conduct: http://python.org/psf/codeofconduct/
