[Python-ideas] PEP 484 (Type Hints) -- first draft round

Guido van Rossum guido at python.org
Fri Jan 16 20:45:01 CET 2015


That's discussed in this section:
https://www.python.org/dev/peps/pep-0484/#compatibility-with-other-uses-of-function-annotations
. The dict notation (which was proposed in an earlier thread on
python-ideas) looks too messy to seriously support.

On Fri, Jan 16, 2015 at 11:38 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:

> Guido van Rossum schrieb am 16.01.2015 um 18:17:
> > After a long editing process we've got PEP 484
> > <https://www.python.org/dev/peps/pep-0484/> (Type Hints) ready for your
> > review.
>
> I can't see it mention interoperability with other usages of function
> annotations. I think the idea was that in this case, the type hints must be
> explicitly declared as such, e.g.
>
>     def func(x: {'type': str, 'wobble': 'off',
>                  'ctype': 'std::string[utf8]'}) ->
>                                   {'type': str, 'wobble': 'sure'}:
>         return x + 'huhu'
>
> Stefan
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150116/1c54410d/attachment.html>


More information about the Python-ideas mailing list