[Python-3000] Conventions for annotation consumers (was: Re: Draft pre-PEP: function annotations)

Paul Moore p.f.moore at gmail.com
Tue Aug 15 16:38:34 CEST 2006

On 8/15/06, Collin Winter <collinw at gmail.com> wrote:
> Here's the modified example
> @docstring
> @typechecker
> @constrain_values
> def foo(a: {'doc': "Frobnication count",
>            'type': Number,
>            'constrain_values': range(3, 9)},
>        b: {'type': Number,
>             # This can be only 4, 8 or 12
>            'constrain_values': [4, 8, 12]}) -> {'type': Number}

I've been keeping out of this - I haven't followed the discussions,
and I am certainly not up to speed on the various subtleties, but
*surely* there's no intention that a monstrosity like this would count
as a "normal" function definition in Py3K???!!!!

> I'm going to raise the bar for future ideas on this subject: any
> proposals must be able to address the following use cases:
> Proposals that do not address all of these will not be considered.

Can I suggest a further constraint - anything that results in the
definition of a simple 2-argument function not fitting on a single
source line is probably unworkable in practice?


More information about the Python-3000 mailing list