[Python-Dev] PEP 443 - Single-dispatch generic functions
Ethan Furman
ethan at stoneleaf.us
Thu May 23 17:04:19 CEST 2013
More information about the Python-Dev mailing list
Thu May 23 17:04:19 CEST 2013
- Previous message: [Python-Dev] PEP 443 - Single-dispatch generic functions
- Next message: [Python-Dev] PEP 443 - Single-dispatch generic functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 05/23/2013 07:58 AM, Łukasz Langa wrote: > On 23 maj 2013, at 16:49, Guido van Rossum <guido at python.org> wrote: > >> Łukasz, are there any open issues? Otherwise I'm ready to accept the PEP. > > There's one. Quoting the PEP: > > "The dispatch type is currently specified as a decorator argument. The > implementation could allow a form using argument annotations. This usage > pattern is out of scope for the standard library (per PEP 8). However, > whether this registration form would be acceptable for general usage, is > up to debate." > > I feel that the PEP should explicitly allow or disallow for the > implementation to accept dispatch on annotations, e.g.: > > @func.register > def _(arg: int): > ... > > versus > > @func.register(int) > def _(arg): > ... If the stdlib is still staying out of the annotation business, then it should not be allowed. -- ~Ethan~
- Previous message: [Python-Dev] PEP 443 - Single-dispatch generic functions
- Next message: [Python-Dev] PEP 443 - Single-dispatch generic functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list