diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-12-28 06:47:50 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-12-28 06:47:50 (GMT) |
commit | c150536b5efadf71fcb4187cad7258be7268e157 (patch) | |
tree | aeb17f5e0ecc6cc8ccdecb2b64e3f46a0a3af85c /Parser/Python.asdl | |
parent | f6657e67b3cf89649d14d9012b3964a3490d45b0 (diff) | |
download | cpython-c150536b5efadf71fcb4187cad7258be7268e157.zip cpython-c150536b5efadf71fcb4187cad7258be7268e157.tar.gz cpython-c150536b5efadf71fcb4187cad7258be7268e157.tar.bz2 |
PEP 3107 - Function Annotations thanks to Tony Lownds
Diffstat (limited to 'Parser/Python.asdl')
-rw-r--r-- | Parser/Python.asdl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl index dbf14e7..2c3fa94 100644 --- a/Parser/Python.asdl +++ b/Parser/Python.asdl @@ -10,7 +10,7 @@ module Python version "$Revision$" | Suite(stmt* body) stmt = FunctionDef(identifier name, arguments args, - stmt* body, expr* decorators) + stmt* body, expr* decorators, expr? returns) | ClassDef(identifier name, expr* bases, stmt* body) | Return(expr? value) @@ -100,8 +100,12 @@ module Python version "$Revision$" excepthandler = (expr? type, expr? name, stmt* body, int lineno, int col_offset) - arguments = (expr* args, identifier? vararg, expr* kwonlyargs, - identifier? kwarg, expr* defaults, expr* kw_defaults) + arguments = (arg* args, identifier? vararg, expr? varargannotation, + arg* kwonlyargs, identifier? kwarg, + expr? kwargannotation, expr* defaults, + expr* kw_defaults) + arg = SimpleArg(identifier arg, expr? annotation) + | NestedArgs(arg* args) -- keyword arguments supplied to call keyword = (identifier arg, expr value) |