Message313179
If fgps never returns 0, then returning 0 instead of None would allow simplification of
if bod is not None or startat == 1:
break
parser.set_lo(bod or 0)
to
if bod or startat == 1:
break
parser.set_lo(bod)
If it can (or should) ever return 0, separate from None, I would like to see a test case for that. We could then think about whether or not the loop should break on 0 as well as None.
Perhaps separate issue: the 'if use_ps1' statements in editor and hyperparser, and a couple of lines before, is nearly identical, and could be factored into a separate editor method that returns a parser instance ready for analysis. It could then be tested in isolation. The method should return a parser instance ready for analysis.
Both blocks have an explicit set_lo(0) call, which does nothing, and could be removed. |
|
Date |
User |
Action |
Args |
2018-03-03 04:15:02 | terry.reedy | set | recipients:
+ terry.reedy, cheryl.sabella |
2018-03-03 04:15:02 | terry.reedy | set | messageid: <1520050502.16.0.467229070634.issue32989@psf.upfronthosting.co.za> |
2018-03-03 04:15:02 | terry.reedy | link | issue32989 messages |
2018-03-03 04:15:02 | terry.reedy | create | |
|