What means "->"?
malaclypse2 at gmail.com
Tue Apr 28 20:03:52 CEST 2015
On Tue, Apr 28, 2015 at 1:18 PM, <stehlampen at arcor.de> wrote:
> in the Python Language Specification, I've found the delimiter -> (cf.
> https://docs.python.org/3/reference/lexical_analysis.html#delimiters, last
> entry in the table´s second line). Could you please describe the effects of
> this delimiter? I read nothing about -> by now. In addition, help("->")
> didn´t work.
It's part of the syntax for function annotations.
See here in the reference manual:
and/or refer to PEP 3107 for more background:
If you're interested, PEP 484
(https://www.python.org/dev/peps/pep-0484/) is attempting to chart out
the future uses of function annotation for doing type checking in
external tools (keep in mind that PEP 484 isn't final yet, nor has it
been accepted, my impression is that it's still a work in progress).
More information about the Python-list