Python 3.2a0 (py3k:82529M, Jul 4 2010, 17:35:10) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import parser [38213 refs] >>> parser.sequence2st(parser.suite("def f(a:int) -> int: pass").totuple()) Traceback (most recent call last): File "", line 1, in parser.ParserError: VALIDATION FAILURE: report this to the maintainer! [38264 refs]
Patch fixing validation of function annotations and keyword-only arguments. There's still the issue of false positives: annotations on lambda arguments should raise an exception, but don't.
The extra space in Grammar was already removed in r82624. The remaining part of the patch looks good to me. The lambda thing is not important, if you get an error when trying to compile the resulting st.