-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when an attribute node was used inside an unary op (#8209)
Closes #8207
- Loading branch information
1 parent
219ad33
commit 70f7e3a
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Fix a crash happening when a class attribute was negated in the start argument of an enumerate. | ||
|
||
Closes #8207 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Regression test for 8207.""" | ||
|
||
# pylint: disable=missing-docstring,too-few-public-methods | ||
|
||
class Example: | ||
def __init__(self): | ||
self.offset = -10 | ||
|
||
def minus_offset(self): | ||
return { | ||
(x, x): value | ||
for x, row in enumerate([(5, 10), (20, 30)]) | ||
for y, value in enumerate(row, -self.offset) | ||
} |