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 bskinn
Recipients bskinn, paul.moore
Date 2019-08-09.18:41:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565376075.16.0.0207302531469.issue36714@roundup.psfhosted.org>
In-reply-to
Content
I suppose one alternative solution might be to tweak the ELLIPSIS feature of doctest, such that it would interpret a run of >=3 periods in a row (matching regex pattern of "[.]{3,}") as 'ellipsis'.

The regex for PS2 could then have a negative lookahead added, so that it *only* matches three periods, plus optionally other content: '\.\.\.(?!\.)'

That way, a line like "... foo" would retain the current meaning of "'source' line, consisting of PS2 plus the identifier 'foo'", but the meaning of "arbitrary content followed by ' foo'" could be achieved by ".... foo", since the leading "...." would NOT match the negative lookahead for PS2.

In other situations, where "..." is *not* the leading non-whitespace content, the old behavior suffices: the PS2 regex won't match anyways, so it'll be left for ELLIPSIS to process.
History
Date User Action Args
2019-08-09 18:41:15bskinnsetrecipients: + bskinn, paul.moore
2019-08-09 18:41:15bskinnsetmessageid: <1565376075.16.0.0207302531469.issue36714@roundup.psfhosted.org>
2019-08-09 18:41:15bskinnlinkissue36714 messages
2019-08-09 18:41:14bskinncreate