Terry J. Reedy added the comment:
Checking, I see that the default ^D binding to DEL is documented in IDLE Help,
section 2, Editing and Navigation, along with other Text defaults. (I need to
determine if the list is complete. Is it the same on all systems?)
I question whether IDLE should allow these to be changed, or whether at least
some should be fixed. The information should certainly be made available
somehow in the key customization UI. The UI should inform users when a proposed
customization creates a conflict with existing bindings. (This last is more or
less covered by other issues.)
In Shell, ^D is treated as EOF and closes the window (but not IDLE if another
window is open), even (recently) on Windows.
> Ctrl-D is binded to commenting out a block in IDLE.
This is only true in the IDLE Modern UNIX binding that you wrote for 3.6 (and
possibly in user customizations). All other builtin bindings use Alt-3 for
'comment-region'. If I had noticed the conflict before pushing, I would have
brought it up. Too late.
As for the patch. Adding "return 'break'" in general looks good, but I have
not checked each case yet. (Not having side by side diffs as with Rietveld
makes this much harder.) In some places, you add "return None" instead. I am
not sure why the difference. If there is a masked binding, having 'key-x' do
one thing sometimes and something else other times would seem disconcerting.
Removing "assertIsNone(<method call>)" in test_parenmatch.py appears valid
since the assert did not really test much for calls that always returned None
(and now always 'break'). Improving that test file would be a new issue.
Testing the change in wrapper functions of the form
def xyz_event(event):
xyz()
return 'break'
will be easy: check that a mock xyz is called and that the wrapper returns
'break'. Testing xyz itself can be deferred. Testing event handlers that do
the work internally, as in (un)comment_region_event, will require some fixture
setup. As before, I expect to work on adding tests.
Since idelib essentially identical in 3.6 and 3.7, I think your original
cherry-pick 3.6 tag was correct in that the patch should work as is. It would
have to be changed at least as far as file names is concerned for other
versions, but since the Modern Unix keyset and associated changes were new in
3.6 and not backported, I am not inclined to backport this either.
----------
stage: patch review -> test needed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29910>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com