On Apr 1, 2005 8:57 PM, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > I'm trying to add support to the AST compiler for decorators. I'm > stuck in trying to represent them in ASDL. This is what I currently > have: > > stmt = FunctionDef(decorator* decorators, identifier name, > arguments args, stmt* body)
I've been wondering if decorators and default argument values should be nodes that wrap a function call. The argument in favor of this approach is that they are in a different block that the function body and arguments. It complicates the visitor code in several places because you have to evaluate parts of the FunctionDef in one namespace, then enter the function's namespace and continue. Jeremy _______________________________________________ Compiler-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/compiler-sig
