mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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.
This commit is contained in:
parent
ef17c16b36
commit
52cc1d838f
25 changed files with 604 additions and 237 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue