[pypy-dev] python annotations

Amaury Forgeot d'Arc amauryfa at gmail.com
Thu Mar 14 23:26:28 CET 2013


2013/3/14 Maciej Fijalkowski <fijall at gmail.com>

> On Thu, Mar 14, 2013 at 2:18 PM, Dzhelil Rufat <dzhelil at gmail.com> wrote:
> > I just found out about a new feature in python that allows you to do
> > function annotations like below:
> >
> > def greet(name: str, age: int) -> str:
> >     print('Hello {0}, you are {1} years old'.format(name, age))
> >
> >
> > See this link for a more detailed description:
> >
> http://ceronman.com/2013/03/12/a-powerful-unused-feature-of-python-function-annotations/
> >
> > Are there any plans to incorporate this feature into rpython?
> >
> > I presume this would make the static analysis in rpython significantly
> > easier, and would speed up the compilation process?
>
> There are various plans about enforcing types more strictly in
> RPython. Using *this* precise syntax is one of the options, but this
> is not the problem. The problem is making expressive enough object
> model. Also, putting work into that.
>

The annotation syntax is only available in Python 3, and RPython is still
defined on top of Python 2.

-- 
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130314/43415a38/attachment.html>


More information about the pypy-dev mailing list