[Python-ideas] PEP 484 evolution
Paul Moore
p.f.moore at gmail.com
Fri Mar 18 19:07:58 EDT 2016
On 18 March 2016 at 22:51, Rick Johnson <rantingrickjohnson at gmail.com> wrote:
> In pep484, the declaration seems to be firmly
> coupled/interleaved with the source code:
>
> def greeting(name: str) -> str:
> return 'Hello ' + name
>
> Oh my. But if so, i would hardly call this "a hint". Are we
> going to introduce `->` as a method for defining the return
> type of a function, and special-case `:` for binding types
> to symbols in sigs?
You do realise that PEP 484 was implemented in Python 3.5, don't you?
See https://docs.python.org/3/library/typing.html
The question here is around some additions (which I don't understand
too well, not being a user of type hints) that Guido is looking to add
in 3.5.2.
Paul
More information about the Python-ideas
mailing list