[Python-Dev] PEP 484 wishes (original) (raw)
Alex Grönholm alex.gronholm at nextday.fi
Mon May 18 00:07:12 CEST 2015
- Previous message (by thread): [Python-Dev] [Python-checkins] peps: Apply Chris's changes, including an acceptance mark
- Next message (by thread): [Python-Dev] PEP 484 wishes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Looking at PEP 484, I came up with two use cases that I felt were not catered for:
- 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)
- 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?
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150518/72eb00e7/attachment.html>
- Previous message (by thread): [Python-Dev] [Python-checkins] peps: Apply Chris's changes, including an acceptance mark
- Next message (by thread): [Python-Dev] PEP 484 wishes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]