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)