mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Patch #1759: Backport of PEP 3129 class decorators
with some help from Georg
This commit is contained in:
parent
b12f0b581a
commit
5224d28d38
15 changed files with 1591 additions and 1465 deletions
|
@ -73,13 +73,14 @@ struct _stmt {
|
|||
identifier name;
|
||||
arguments_ty args;
|
||||
asdl_seq *body;
|
||||
asdl_seq *decorators;
|
||||
asdl_seq *decorator_list;
|
||||
} FunctionDef;
|
||||
|
||||
struct {
|
||||
identifier name;
|
||||
asdl_seq *bases;
|
||||
asdl_seq *body;
|
||||
asdl_seq *decorator_list;
|
||||
} ClassDef;
|
||||
|
||||
struct {
|
||||
|
@ -359,11 +360,12 @@ mod_ty _Py_Expression(expr_ty body, PyArena *arena);
|
|||
mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
|
||||
#define FunctionDef(a0, a1, a2, a3, a4, a5, a6) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6)
|
||||
stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
|
||||
asdl_seq * decorators, int lineno, int col_offset,
|
||||
asdl_seq * decorator_list, 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
|
||||
lineno, int col_offset, PyArena *arena);
|
||||
#define ClassDef(a0, a1, a2, a3, a4, a5, a6) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6)
|
||||
stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * body,
|
||||
asdl_seq * decorator_list, 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);
|
||||
#define Delete(a0, a1, a2, a3) _Py_Delete(a0, a1, a2, a3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue