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 cheryl.sabella, terry.reedy
Date 2018-03-03.04:15:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520050502.16.0.467229070634.issue32989@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-03-03 04:15:02terry.reedysetrecipients: + terry.reedy, cheryl.sabella
2018-03-03 04:15:02terry.reedysetmessageid: <1520050502.16.0.467229070634.issue32989@psf.upfronthosting.co.za>
2018-03-03 04:15:02terry.reedylinkissue32989 messages
2018-03-03 04:15:02terry.reedycreate