GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — GH-123391: Code generators: Track stack and locals in `if` statements. by markshannon · Pull Request #123397 · python/cpython Conversation
|
| f"Locals not defined in stack order. " | ||
| f"Expected '{out.name}' is defined before '{undefined}'" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| f"Locals not defined in stack order. " | |
| f"Expected '{out.name}' is defined before '{undefined}'" | |
| f"Locals not defined in stack order. " | |
| f"Expected {out.name!r} to be defined before {undefined!r}" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| break | ||
| undefined = "" | ||
| for out in self.outputs: | ||
| if out.defined: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If the first out.defined holds, then we don't really have anything "before" (unless this case is not possible?)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.emit(next(tkn_iter)) | ||
| lparen = next(tkn_iter) | ||
| self.emit(lparen) | ||
| assert(lparen.kind == "LPAREN") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| assert(lparen.kind == "LPAREN") | |
| assert lparen.kind == "LPAREN" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.emit(next(tkn_iter)) | ||
| lparen = next(tkn_iter) | ||
| self.emit(lparen) | ||
| assert(lparen.kind == "LPAREN") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| assert(lparen.kind == "LPAREN") | |
| assert lparen.kind == "LPAREN" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.out.emit(next(tkn_iter)) | ||
| lparen = next(tkn_iter) | ||
| self.emit(lparen) | ||
| assert(lparen.kind == "LPAREN") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| assert(lparen.kind == "LPAREN") | |
| assert lparen.kind == "LPAREN" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| raise analysis_error( | ||
| f"Locals not defined in stack order. " | ||
| f"Expected '{out.name}' is defined before '{undefined}'", | ||
| tkn | ||
| ) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| raise analysis_error( | |
| f"Locals not defined in stack order. " | |
| f"Expected '{out.name}' is defined before '{undefined}'", | |
| tkn | |
| ) | |
| raise analysis_error( | |
| f"Locals not defined in stack order. " | |
| f"Expected {out.name!r} to be defined before {undefined!r}", | |
| tkn | |
| ) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| other.top_offset = self.top_offset.copy() | ||
| other.base_offset = self.base_offset.copy() | ||
| other.variables = [var.copy() for var in self.variables] | ||
| other.defined = set(self.defined) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| other.defined = set(self.defined) | |
| other.defined = self.defined.copy() |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.out.emit(next(tkn_iter)) | ||
| lparen = next(tkn_iter) | ||
| self.emit(lparen) | ||
| assert(lparen.kind == "LPAREN") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| assert(lparen.kind == "LPAREN") | |
| assert lparen.kind == "LPAREN" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.run_cases_test(input, output) | ||
|
|
||
|
|
||
| def test_pep7_condition(self): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe test the else branch as well?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.