Looking at PEP 484, I came up with two use cases that I felt were not catered for:

1. Specifying that a parameter should be a subclass of another
   (example: Type[dict] would match dict or OrderedDict; plain "Type"
   would equal "type" from builtins)
2. Specifying that a callable should take at least the specified
   arguments but would not be limited to them: Callable[[str, int,
   ...], Any]

Case #2 works already (Callable[[str, int], Any] if the unspecified arguments are optional, but not if they're mandatory. Any thoughts?

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to