[issue12458] Tracebacks should contain the first line of continuation lines

2021-06-15 Thread Edward Yang
Edward Yang added the comment: Supposing I like the old behavior (line number of the end of the statement), is there any way to recover that line number from the traceback after this change? -- nosy: +ezyang ___ Python tracker

[issue12458] Tracebacks should contain the first line of continuation lines

2018-10-02 Thread Ned Batchelder
Ned Batchelder added the comment: The other drawback is changing how the trace function is notified in a few scenarios. -- nosy: +nedbat ___ Python tracker ___ __

[issue12458] Tracebacks should contain the first line of continuation lines

2018-09-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue12458] Tracebacks should contain the first line of continuation lines

2018-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset da8d72c953369b872a12c13f136ada77a786714a by Serhiy Storchaka in branch 'master': bpo-12458: Fix line numbers for multiline expressions. (GH-8774) https://github.com/python/cpython/commit/da8d72c953369b872a12c13f136ada77a786714a -- _

[issue12458] Tracebacks should contain the first line of continuation lines

2018-08-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems PR 8774 fixes all mentioned examples (as well as examples in issue34372), except that tracebacks show the single line number of the first line of the multiline expression instead of the range of lines as was suggested. Showing the range of lines requ

[issue12458] Tracebacks should contain the first line of continuation lines

2018-08-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +8249 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue12458] Tracebacks should contain the first line of continuation lines

2018-07-25 Thread Doug
Change by Doug : -- nosy: +beck ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailm

[issue12458] Tracebacks should contain the first line of continuation lines

2017-03-14 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue12458] Tracebacks should contain the first line of continuation lines

2015-03-18 Thread R. David Murray
Changes by R. David Murray : -- nosy: +ers81239 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue12458] Tracebacks should contain the first line of continuation lines

2014-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is yet one example. x = 1; y = 0; z = 0 ( 1/x + 1/y + 1/z ) The traceback looks correct: Traceback (most recent call last): File "1.py", line 4, in 1/y + ZeroDivisionError: division by zero But for following code: x = 0; y = 1; z =

[issue12458] Tracebacks should contain the first line of continuation lines

2014-10-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue12458] Tracebacks should contain the first line of continuation lines

2014-10-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- stage: test needed -> needs patch versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Pytho

[issue12458] Tracebacks should contain the first line of continuation lines

2014-10-06 Thread R. David Murray
Changes by R. David Murray : -- nosy: +dingo_dasher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue12458] Tracebacks should contain the first line of continuation lines

2013-05-07 Thread R. David Murray
R. David Murray added the comment: Can you preserve just the *additional* indentation? That is, strip the excess leading whitespace, but preserve the logical indentation, like textwrap.dedent does? -- ___ Python tracker

[issue12458] Tracebacks should contain the first line of continuation lines

2013-05-07 Thread Kushal Das
Kushal Das added the comment: I have been able to get the logical line details (start of it), now working on to print the required lines. The current way of showing source lines removes any indentation, but to show all the physical lines (related to the logical line) one should show the indent

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: idlelib has two files that *might* be helpful to anyone who wants to pursue this: PyParse.py and HyperParser.py. One use of the latter is for calltips. When the user types '(', the HyperParser is used first to determine whether the '(' is preceded by an operat

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Ezio Melotti
Ezio Melotti added the comment: > Consider: >r(a()/b(), > d()/e(), > g=h()/i(), > ) I tried to run this, with e() == 0, and got: Traceback (most recent call last): File "deleteme.py", line 6, in d()/e(), ZeroDivisionError: division by zero This is actually a good point

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: >>> Printing a fragment of the logical line is clearly not very helpful Given the unbounded and recursive nature of 'logical line', I disagree with that as a general, versus special-case, statement. Consider: r(a()/b(), d()/e(), g=h()/i(),

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread R. David Murray
R. David Murray added the comment: The point is to print one logical line. Printing a fragment of the logical line is clearly not very helpful...I have found myself a number of times looking for the bug in the fragment printed, and (quickly, but still...) then remembering that the traceback j

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: OK, you would make tracebacks even longer by adding lines that might or might not be be useful. Suppose the error is not the assertion itself, but in one of the expressions (in this case, being compared for equality): self.assertEqual(1/0, 1000) Or

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread R. David Murray
R. David Murray added the comment: I agree that printing all the lines would be best, and printing the first line would be second best. I suspect once someone works out how to do the latter it is just as easy to do the former, though :) -- nosy: +r.david.murray __

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > But on python-ideas, G. Rodola noted the following > assert \ > 1 == 0, \ > "error" [...] > and requested that the *second* or *middle* line should be reported. No, I was suggesting (assuming it's reasonably possible in terms of implementation)

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Dmi Baranov
Changes by Dmi Baranov : -- nosy: +dmi.baranov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Ezio Melotti
Ezio Melotti added the comment: I think all the lines involved in a multi-line expression should be reported. Take for example this simple code: x = [int(c, 16) for c in '0123456789ABCDEFG' if c.isdigit() or c.isupper()] With Python 2 the traceback is: Traceback (most recent cal

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is an enhancement request (at best), not a bug report. I would close it because I think it somewhat dubious, unreasonable, and not helpful. First, I think tracebacks *should* report 'the spot of the foul' for each call frame. What would sometimes be helpf

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-29 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-29 Thread Ian Cordasco
Changes by Ian Cordasco : -- nosy: +icordasc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue12458] Tracebacks should contain the first line of continuation lines

2011-10-18 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12458] Tracebacks should contain the first line of continuation lines

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: This is an interesting proposal. The line number comes from Python/traceback.c:120: tb->tb_lineno = PyFrame_GetLineNumber(frame); and this function is defined in Objects/frameobject.c:35: int PyFrame_GetLineNumber(PyFrameObject *f) { if (f->f_trace)

[issue12458] Tracebacks should contain the first line of continuation lines

2011-10-02 Thread lesmana
Changes by lesmana : -- nosy: +lesmana ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue12458] Tracebacks should contain the first line of continuation lines

2011-07-03 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue12458] Tracebacks should contain the first line of continuation lines

2011-06-30 Thread Petr Splichal
New submission from Petr Splichal : Currently, python tracebacks shows the last of continuation lines when a function spans across multiple lines. This line usually contains some function parameter only and thus is not very useful for debugging the problem. For example: Traceback (most rece