Tal Einat <taleinat+pyt...@gmail.com> added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue21756>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to