On Fri, Apr 16, 2021 at 1:51 AM Sebastian Rittau <srit...@rittau.biz> wrote:
> I am strongly in favor of diverging type annotation syntax from Python > syntax. Currently, type annotations are a very useful tool, but often > clunky to use. Enhancements have been made, but design space is limited > when working within existing Python syntax. Type annotations have a > different set of rules, needs, and constraints than general-purpose Python > code. This is similar to other domain specific languages like regular > expressions. Ideally, Python itself would not check the syntax of > annotations, except as needed for determining the end of an annotation. > Another example is a discussion a little while back on python-ideas about extending what's allowed inside square brackets. It started with a use-case for type specification. It turned out that there were other use cases, more tightly tied to the original meaning of __getitem__. Nevertheless, it struck me at the time that it would be nice if the Typing use case could be addressed without the complication of making something that made sense in two very different domains. - Chris -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@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/SG5MCSP6KQDEO2BDZ6LE76TSKGH7TD6E/ Code of Conduct: http://python.org/psf/codeofconduct/