[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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant