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 <1367356821.06.0.030867292176.issue12458@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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(),
      )
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 = {
  a,
  b,
... <500 lines, one item per line>
  xyz,
}
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.
History
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: <1367356821.06.0.030867292176.issue12458@psf.upfronthosting.co.za>
2013-04-30 21:20:21terry.reedylinkissue12458 messages
2013-04-30 21:20:20terry.reedycreate