[issue2505] Restrict attributes of _ast nodes

2008-03-29 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > On second thought, restricting node attributes may prevent custom AST > processing tools from adding useful information themselves... Indeed. If anything is to be checked, it should be whether the child nodes or attributes have the right t

[issue2505] Restrict attributes of _ast nodes

2008-03-29 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: On second thought, restricting node attributes may prevent custom AST processing tools from adding useful information themselves... __ Tracker <[EMAIL PROTECTED]> __

[issue2505] Restrict attributes of _ast nodes

2008-03-29 Thread Georg Brandl
New submission from Georg Brandl <[EMAIL PROTECTED]>: This patch adds two things to the _ast module: * Nodes can be initialized with keyword arguments: m = _ast.Module(body=[...]) * Only attributes that are in _fields or _attributes can be set on nodes. Martin, what do you think? --