[Python-Dev] Re: Decorators: vertical bar syntax
Fredrik Lundh
fredrik at pythonware.com
Mon Aug 9 18:02:28 CEST 2004
Guido van Rossum wrote:
> Let's make one thing clear; while decorators may be useful for some to
> experiment with attaching signatures to methods, mainstream Python
> will eventually have optional static typing built in, and it won't use
> decorator syntax. (More likely you would specify argument types by
> saying e.g. "def bar(low: int, high: int) -> float: ...")
that could, of course, be seen as rather strong argument against having
decorators after the def but before the colon; let's reserve that space for
information about the return type (or types).
(more about decorators later)
</F>
More information about the Python-Dev
mailing list