Message371079
> You solution is to add a new parameter to __init__ only used by 'flash'. I would rather replace 'mustclose' with mode = 'tip', 'flash', or 'close'. I believe that Stopatindex could be revised within the call.
The problem with this suggestion is that 'mustclose' is a parameter for HyperParser.get_surrounding_brackets(). When that is called, it is too late to affect whether the parsing goes beyond the end of the current line. We could add a 'mode' parameter to the HyperParser constructor, though.
Still, I don't like that approach: HyperParser is currently well encapsulated, but giving it such "modes" would tightly couple it with its current specific uses in IDLE. The approach used in the current patch, with the 'end_at_eol' parameter, preserves HyperParser's encapsulation. |
|
Date |
User |
Action |
Args |
2020-06-09 07:42:34 | taleinat | set | recipients:
+ taleinat, terry.reedy |
2020-06-09 07:42:34 | taleinat | set | messageid: <1591688554.03.0.720650088343.issue21756@roundup.psfhosted.org> |
2020-06-09 07:42:34 | taleinat | link | issue21756 messages |
2020-06-09 07:42:33 | taleinat | create | |
|