Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'Delete' object is not iterable #15

Open
apepkuss opened this issue Jul 21, 2017 · 1 comment
Open

TypeError: 'Delete' object is not iterable #15

apepkuss opened this issue Jul 21, 2017 · 1 comment

Comments

@apepkuss
Copy link

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
@andreif
Copy link
Owner

andreif commented Aug 2, 2017

Hi, please use https://github.com/berkerpeksag/astor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants