mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -983,6 +983,11 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
|
|||
if (!symtable_add_def(st, s->v.ClassDef.name, DEF_LOCAL))
|
||||
return 0;
|
||||
VISIT_SEQ(st, expr, s->v.ClassDef.bases);
|
||||
VISIT_SEQ(st, keyword, s->v.ClassDef.keywords);
|
||||
if (s->v.ClassDef.starargs)
|
||||
VISIT(st, expr, s->v.ClassDef.starargs);
|
||||
if (s->v.ClassDef.kwargs)
|
||||
VISIT(st, expr, s->v.ClassDef.kwargs);
|
||||
if (!symtable_enter_block(st, s->v.ClassDef.name, ClassBlock,
|
||||
(void *)s, s->lineno))
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue