[Python-ideas] from __future__ import function_annotations

Tobias Ivarsson thobes at gmail.com
Wed Apr 11 13:01:04 CEST 2007

I am just curiously wondering about the plans for introducing function
annotations (PEP 3107). I could not find any information about this in the
PEP, neither when I searched the mail archives.
The way I see it this feature could be quite interesting to introduce as
early as possible since I believe that there are quite a few tools that
could benefit from this today.
I could for example see Jython using function annotations for declaring
methods that are supposed to be accessible from java code. This is done via
annotations in the doc string today, and would be a lot clearer using
function annotations.
Jython could implement this use of function annotations without python
supporting it, but that would make the code incompatible between python and
Jython, which would be highly unfortunate.
Therefore i propose that python adds support for function annotations in
version 2.6 via
from __future__ import function_annotations
This would make the change as compatible as for example @decorators or the

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20070411/8c27a1b8/attachment.html>

More information about the Python-ideas mailing list