On Sun, 10 May 2020 14:13:37 -0400 Richard Damon <rich...@damon-family.org> wrote:
> An error like character (whatever) is not a quote (or is not a minus > sign) seems similar. It is one thing to not recognize a funny > character in the language, but to actually parse it well enough to > give a message that says in effect, that may look like a quote to you, > but I am not going to treat is as one, sounds perverse in the > language. If we are going to go to the effort to detect that > particular character, it makes more sense to make it actually DO the > obvious thing ... “In the face of ambiguity, refuse the temptation to guess.” There should be one-- and preferably only one --obvious way to do it. Your argument is that it's not ambiguous. My argument is that it's not within the Python grammar, and therefore it is ambiguous. Also, that forever precludes using those other quotation characters for something else in the future. > ... If not, the the current error seems fine, especially if we could > include more details. An 'invalid character' message, that doesn't > tell you WHICH character is invalid seems like it is holding back, If > it included the bad character, or pointed to it, then the error > becomes a lot more clear. Agreed. -- “Atoms are not things.” – Werner Heisenberg Dan Sommers, http://www.tombstonezero.net/dan _______________________________________________ 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/B5D7F5C4QQOLKQEBYOBODH3ZJ4X6G3VQ/ Code of Conduct: http://python.org/psf/codeofconduct/