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

bpo-42635: Make JUMP_ABSOLUTE at end of 'for' loop as artificial to avoid spurious line events. #23761

Merged
merged 2 commits into from
Dec 14, 2020

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Dec 14, 2020

In 3.10a, the following function will generate extra line events for after the inner loop. This PR fixes that.

def dloop():
   for i in range(3):
       for j in range(3):
           a = i + j
   assert a == 4

Skipping news as this is part of implementing PEP 626

https://bugs.python.org/issue42635

@markshannon markshannon force-pushed the fix-lineno-nested-loops branch 2 times, most recently from 37f6b7b to e4c542f Compare December 14, 2020 11:04
@markshannon markshannon merged commit f5e97b7 into python:master Dec 14, 2020
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants