A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-August/047424.html below:

[Python-Dev] Decorators: vertical bar syntax

[Python-Dev] Decorators: vertical bar syntax [Python-Dev] Decorators: vertical bar syntaxGuido van Rossum guido at python.org
Mon Aug 9 17:16:38 CEST 2004
>    A motivation for this was that one of the examples
> 
> @accepts(int,int)
> @returns(float)
> def bar(low,high):
> 
>    which separates related information too much for me. If
> decorators need to decorate parameters, they are more likely to be
> understood correctly by a reader if the decorations are next to the
> parameters.

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: ...")

--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4