Commit 2f623e4f authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #468 from linkmauve/deprecate-property

Deprecate the 'property …:' syntax, as suggested in #462
parents d3d729e3 4f733077
...@@ -1294,6 +1294,10 @@ class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations): ...@@ -1294,6 +1294,10 @@ class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations):
self._properties.pop() self._properties.pop()
return node return node
def visit_PropertyNode(self, node):
warning(node.pos, "'property %s:' syntax is deprecated, use '@property'" % node.name, 2)
return node
def visit_DefNode(self, node): def visit_DefNode(self, node):
scope_type = self.scope_type scope_type = self.scope_type
node = self.visit_FuncDefNode(node) node = self.visit_FuncDefNode(node)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment