Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-97933: inline list/dict/set comprehensions#101441
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
72afa83898823422c4a86c1b54f043db9b8ed3209baceb6c7e57c354795d854686221aac99697db208d58b7605146208568773653be3beccf0c051e142859a568a470add772e17d5d84b87d20936b2917ae0bd029f0fc5b463c74067f50ba73dc0edecb313c4109baad8802a11c019a724a9d9fb6a025b90b34de06db319b52046b6c5f2691a8f4a01274e2b0727d6f51a12948a78a3643722b4bf9e1f1ca636a546c7a4ffb9f89ebaacf5f5914d77ffae4e676077cda8425a6656e46b1402e7a95401feFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -195,6 +195,18 @@ | ||
| """ | ||
| class ListComprehensionTest(unittest.TestCase): | ||
| def test_unbound_local_after_comprehension(self): | ||
| def f(): | ||
| if False: | ||
| x = 0 | ||
| [x for x in [1]] | ||
| return x | ||
carljm marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| with self.assertRaises(UnboundLocalError): | ||
| f() | ||
| __test__ = {'doctests' : doctests} | ||
| def load_tests(loader, tests, pattern): | ||