[Python-3000] optional argument annotations

Brett Cannon brett at python.org
Sun Nov 26 22:10:24 CET 2006


On 11/24/06, Tony Lownds <tony at pagedna.com> wrote:
>
> > Obviously signature objects would grow support for annotations, but I
> > still need the information to be carried on the code object to
> > incorporate into signature objects.
> >
>
> Signature objects still need a way to know the nested parameters, right?


They already handle them.

How about a co_argnames attribute? eg for
>
> def f((x, y), z): pass
>
> f.func_code.co_argnames would be (('x', 'y'), 'z')


That's fine, but the compiler would need to change if it were to use this.
Plus I am still hoping to make nested parameters disappear in Py3K (I won't
be pushing for it any sooner than PyCon, though).

I need to implement something like this to properly build
> func_annotations
> inside MAKE_FUNCTION.



I don't quite follow.  Don't you already have support in MAKE_FUNCTION when
the object is created?

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20061126/fc3c1711/attachment.htm 


More information about the Python-3000 mailing list