self.visitchildren(node)
return node
+ def visit_DelStatNode(self, node):
+ for arg in node.args:
+ self.mark_assignment(arg, arg)
+ self.visitchildren(node)
+ return node
+
class MarkOverflowingArithmetic(CythonTransform):
# It may be possible to integrate this with the above for
+++ /dev/null
-# Errors reported during code generation.
-
-cdef int i
-
-def f(a):
- del a # error: deletion of local name not supported
- del i # error: deletion of local name not supported
-
-_ERRORS = u"""
-6:52: Deletion of local or C global name not supported
-7:52: Deletion of local or C global name not supported
-"""
while a.attr:
del a.attr[:]
return a.attr
+
+def del_local(a):
+ """
+ >>> del_local(object())
+ """
+ del a
+ assert a is None # Until we have unbound locals...