Skip to content

TypeError: 'Delete' object is not iterable #15

Description

@apepkuss

visit_Delete function (in the line 297 of codegen.py) throws a TypeError exception when I run my code. I am trying to fix the bug as below. If you have any concern, please send me a message. Thanks.

def visit_Delete(self, node):
self.newline(node)
self.write('del ')
try:
# BUG fixed: for idx, target in enumerate(node):
for idx, target in enumerate(node.targets):
if idx:
self.write(', ')
self.visit(target)
except TypeError as te:
print te.message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions