This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients JelleZijlstra, iritkatriel, nedbat, sdeibel, terry.reedy
Date 2021-12-06.15:12:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638803568.8.0.880361161839.issue13548@roundup.psfhosted.org>
In-reply-to
Content
Reproduced on 3.11. 


An implicit return doesn't have a line, so it's not clear what should happen. Assigning the next line to it wouldn't be correct either (it could be the first line of the next function). 

We could say that in this case there is no line event, just a return event (unless that messes up the tracer somehow).

If you add a return statement it makes sense:

/Users/iritkatriel/src/cpython/mm.py 7 call
/Users/iritkatriel/src/cpython/mm.py 8 line
/Users/iritkatriel/src/cpython/mm.py 10 line
/Users/iritkatriel/src/cpython/mm.py 11 line
/Users/iritkatriel/src/cpython/mm.py 14 line
/Users/iritkatriel/src/cpython/mm.py 14 return

(line 13 does not appear because that's the else, the return is assigned line 14 which is where it really is).
History
Date User Action Args
2021-12-06 15:12:48iritkatrielsetrecipients: + iritkatriel, terry.reedy, sdeibel, nedbat, JelleZijlstra
2021-12-06 15:12:48iritkatrielsetmessageid: <1638803568.8.0.880361161839.issue13548@roundup.psfhosted.org>
2021-12-06 15:12:48iritkatriellinkissue13548 messages
2021-12-06 15:12:48iritkatrielcreate