[Python-ideas] [Wild Idea] Static Ducks

Terry Reedy tjreedy at udel.edu
Sun Sep 20 00:55:54 CEST 2009

Dj Gilcrease wrote:

> Design Goals:
>     The new syntax should
>         * Be simple to read
>         * Make it obvious what is happening; at the very least it should be
>         obvious that new users can safely ignore it when writing their own code
>         * Allow future compilers to optimize for Static Typing.
>         * Work within a function or method definition to ensure a passed
>         variable is the proper type
>         * Allow Functions/Methods return values to be typed and checked
>         * Raise an TypeError exception when the variable is set to something
>         improper, or the function/method tries to return an improper value

My impression is that all the above could be done (at least by 
alternative implementations) with current 3.x function signatures. Where 
do you think they fail?

> Issues:
>     If this PEP is implemented it may conflict with PEP 362
>     (Function Signature Object)

More information about the Python-ideas mailing list