PEP-0318, @decorator-style. In Guido's words:

"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728.
This commit is contained in:
Anthony Baxter 2004-08-02 06:10:11 +00:00
parent fd7dc5169c
commit c2a5a63654
28 changed files with 2965 additions and 2335 deletions

View file

@ -224,6 +224,8 @@ class SymbolVisitor:
visitExpression = visitModule
def visitFunction(self, node, parent):
if node.decorators:
self.visit(node.decorators, parent)
parent.add_def(node.name)
for n in node.defaults:
self.visit(n, parent)