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 serhiy.storchaka, terry.reedy
Date 2017-03-26.22:17:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490566680.28.0.625296578886.issue29910@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-03-26 22:18:00terry.reedysetrecipients: + terry.reedy, serhiy.storchaka
2017-03-26 22:18:00terry.reedysetmessageid: <1490566680.28.0.625296578886.issue29910@psf.upfronthosting.co.za>
2017-03-26 22:18:00terry.reedylinkissue29910 messages
2017-03-26 22:17:59terry.reedycreate