Re: Help with the AST re decorators
Neil Schemenauer <[email protected]> Sat, 2 Apr 2005 10:19:54 -0700
| Newsgroups | gmane.comp.python.compiler |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Apr 02, 2005 at 10:27:10AM -0500, Neal Norwitz wrote: > I don't have any advice, but have you looked at this patch: > > http://sourceforge.net/tracker/index.php?func=detail&aid=1167709&group_id=5470&atid=305470 I just looked at it. The patch works and is simpler than what I was doing. It uses this definition: - stmt = FunctionDef(identifier name, arguments args, stmt* body) + stmt = FunctionDef(identifier name, arguments args, + stmt* body, expr* decorators) When transforming the CST to the AST, it creates either a Call or a Name/Attribute node for each decorator expr. Neil