Chris Angelico wrote:
How do you declare that a parameter must be an instance of some class? Classes are themselves created at run time. Or would your typing system require that all types be created in some declarable way?
Types that you want statically checked have to be described in a declarative way, because the description is going to be processed by a tool that is not executing the program. You wouldn't be able to put a type that can't be described declaratively into a type annotation, but there would be no reason to do so in the first place. -- Greg -- https://mail.python.org/mailman/listinfo/python-list