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 terry.reedy
Recipients dmi.baranov, ezio.melotti, flox, georg.brandl, giampaolo.rodola, icordasc, lesmana, ncoghlan, petri.lehtinen, psss, r.david.murray, terry.reedy
Date 2013-04-30.21:20:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>>> 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.

If either e() or i() returns 0, printing all 4 lines is less helpful, by adding noise (which line has the error?), than just printing the 1 line with the ZeroDivisionError. The context is irrelevant.

Or consider:
mymegalist = {
... <500 lines, one item per line>
If 1 of the expressions raises an error, do you really want all 500 lines in the traceback? Again, the context is probably irrelevant.

Quite aside from this, 'd()/e(),' and 'g=h()/i(),' are both legal logical lines in themselves (though with different semantics) as well as being fragments of the r call.

Moreover, the multiline r call above may itself be just a fragment of a call to another function (further indented). The practical difficulty for the proposal, even if limited to multiline calls, is that any bare call could either be part of a larger expression by returning something or be a statement operating through side-effects. Similarly, any 'var=f()' call could either be an assignment statement or keyword arg expression in some other call.
Date User Action Args
2013-04-30 21:20:21terry.reedysetrecipients: + terry.reedy, georg.brandl, ncoghlan, giampaolo.rodola, ezio.melotti, psss, r.david.murray, flox, lesmana, petri.lehtinen, icordasc, dmi.baranov
2013-04-30 21:20:21terry.reedysetmessageid: <>
2013-04-30 21:20:21terry.reedylinkissue12458 messages
2013-04-30 21:20:20terry.reedycreate