Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(240)

#21217: inspect.getsourcelines finds wrong lines when lambda used argument to decorator

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 2 months ago by thomasballinger
Modified:
3 years, 2 months ago
Reviewers:
yselivanov.ml, pcmanticore, pitrou
CC:
terry.reedy, Nick Coghlan, AntoinePitrou, meadori, Claudiu.Popa, devnull_psf.upfronthosting.co.za, Yury Selivanov, akaptur, ballingt
Visibility:
Public.

Patch Set 1 #

Total comments: 1

Patch Set 2 #

Total comments: 1

Patch Set 3 #

Total comments: 1

Patch Set 4 #

Total comments: 1

Patch Set 5 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/inspect.py View 1 2 3 4 4 chunks +23 lines, -14 lines 0 comments Download
Lib/test/inspect_fodder2.py View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download
Lib/test/test_inspect.py View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 5
Yury.Selivanov
http://bugs.python.org/review/21217/diff/11595/Lib/inspect.py File Lib/inspect.py (right): http://bugs.python.org/review/21217/diff/11595/Lib/inspect.py#newcode823 Lib/inspect.py:823: elif iscode(object) or isroutine(object): instead of 'isroutine' please use ...
4 years, 2 months ago #1
Yury.Selivanov
http://bugs.python.org/review/21217/diff/11612/Lib/inspect.py File Lib/inspect.py (right): http://bugs.python.org/review/21217/diff/11612/Lib/inspect.py#newcode811 Lib/inspect.py:811: def _line_number_helper(code_obj, lines, lnum): Even though this is a ...
4 years, 2 months ago #2
Yury.Selivanov
also, please add an entry to Misc/NEWS
4 years, 2 months ago #3
Claudiu.Popa
http://bugs.python.org/review/21217/diff/11615/Lib/inspect.py File Lib/inspect.py (right): http://bugs.python.org/review/21217/diff/11615/Lib/inspect.py#newcode833 Lib/inspect.py:833: elif iscode(object): Small optimization tip, move isfunction and ismethod ...
3 years, 5 months ago #4
AntoinePitrou
3 years, 2 months ago #5
http://bugs.python.org/review/21217/diff/14547/Lib/inspect.py
File Lib/inspect.py (right):

http://bugs.python.org/review/21217/diff/14547/Lib/inspect.py#newcode896
Lib/inspect.py:896: line_offsets = list(code_obj.co_lnotab[1::2])
Rather than do this by hand, it would be nicer IMO to reuse the findlinestarts()
function in the dis module.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7