Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Needed parenthesis in withas #25

Open
rocky opened this issue Nov 24, 2017 · 0 comments
Open

Needed parenthesis in withas #25

rocky opened this issue Nov 24, 2017 · 0 comments

Comments

@rocky
Copy link

rocky commented Nov 24, 2017

# Bug is not putting parens around (x, y)
def bug(self, nested, a, b):
    with self.assertRaises(ZeroDivisionError):
        with nested(a(), b()) as (x, y):
                1 // 0

when decompiled omits the parenthesis in as (x, y) and apparently this is needed.

rocky/python-uncompyle6@37b8e21

suggests what can be done here and in Issue #24

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

No branches or pull requests

1 participant