summaryrefslogtreecommitdiffstats
path: root/Include/Python-ast.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-03-18 15:41:51 (GMT)
committerGuido van Rossum <guido@python.org>2007-03-18 15:41:51 (GMT)
commit52cc1d838f4fee573e57b5b182d8e5f5db63240f (patch)
tree0ea50468d2b04ee12131c155c5918e8a70dafe1c /Include/Python-ast.h
parentef17c16b366b09a78dfe5fc5171fe2b0b29f60e5 (diff)
downloadcpython-52cc1d838f4fee573e57b5b182d8e5f5db63240f.zip
cpython-52cc1d838f4fee573e57b5b182d8e5f5db63240f.tar.gz
cpython-52cc1d838f4fee573e57b5b182d8e5f5db63240f.tar.bz2
Implement PEP 3115 -- new metaclass syntax and semantics.
The compiler package hasn't been updated yet; test_compiler.py fails. Otherwise all tests seem to be passing now. There are no occurrences of __metaclass__ left in the standard library. Docs have not been updated.
Diffstat (limited to 'Include/Python-ast.h')
-rw-r--r--Include/Python-ast.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h
index 233a576..e07f025 100644
--- a/Include/Python-ast.h
+++ b/Include/Python-ast.h
@@ -82,6 +82,9 @@ struct _stmt {
struct {
identifier name;
asdl_seq *bases;
+ asdl_seq *keywords;
+ expr_ty starargs;
+ expr_ty kwargs;
asdl_seq *body;
} ClassDef;
@@ -380,8 +383,9 @@ mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
asdl_seq * decorators, expr_ty returns, int lineno, int
col_offset, PyArena *arena);
-#define ClassDef(a0, a1, a2, a3, a4, a5) _Py_ClassDef(a0, a1, a2, a3, a4, a5)
-stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int
+#define ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8)
+stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords,
+ expr_ty starargs, expr_ty kwargs, asdl_seq * body, int
lineno, int col_offset, PyArena *arena);
#define Return(a0, a1, a2, a3) _Py_Return(a0, a1, a2, a3)
stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena);