(the example with changing HTTP_OK value is downright horrifying).
As was just mentioned by Guido in another thread, there is a SyntaxWarning to alert you.
This leads to the idea that, if a special syntax if eventually used for Value Patterns, using the comparison operator in it might be useful.
Have a look at https://www.mail-archive.com/python-dev@python.org/msg109254.html . Unfortunately, this doesn't scale well with attribute checks...
Cheers, Jean Abou Samra
On 17/08/2020 7:39 pm, Jean Abou Samra wrote:
(the example with changing HTTP_OK value is downright horrifying).
As was just mentioned by Guido in another thread, there is a SyntaxWarning to alert you.
That doesn't help if the symbolic constant is the last match.
Also, it's only in the reference implementation. It's not in the specification.
This leads to the idea that, if a special syntax if eventually used for Value Patterns, using the comparison operator in it might be useful.
Have a look athttps://www.mail-archive.com/python-dev@python.org/msg109254.html . Unfortunately, this doesn't scale well with attribute checks...
Cheers,
Jean Abou Samra
Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/FXHQ57FF... Code of Conduct: http://python.org/psf/codeofconduct/