[Idle-dev] KeyConfig, KeyBinding and other related issues.

Tal Einat taleinat at gmail.com
Wed Jun 18 19:33:00 CEST 2014


I see you went with an entirely different design for this than either what
you originally suggested or what I suggested. Could you explain why?

Technical notes:

1) _get_type() should be a class method instead of a normal method (using
the @classmethod decorator). This will also make testing it simpler.
2) Never use "is" to compare strings!
3) Why not use Counter when generated the list of duplicate keys, as I
suggested in my code sample? It's more straightforward and elegant.
4) I prefer to call the parts something other than "keys", perhaps "parts"
or "pieces". In some cases, such as mouse events, they are not keyboard
keys.


On Wed, Jun 18, 2014 at 7:23 PM, Saimadhav Heblikar <
saimadhavheblikar at gmail.com> wrote:

> In this version, I have attempted an API like solution. It does not
> raise any error.(except for couple of asserts for REALLY bad input,
> and that too only in internal functions)
>
> All mistakes are caught(i.e. it does not fail on the first
> "mistake".). I have documented every where, so should be easy to read.
> Each aspect is a method. So is easy to unittest and has been
> unittested.
>
> It can detect invalid begin character, invalid end character, repeated
> keys, invalid keys, invalid ordering and with reason, where not
> directly obvious.
>
> --
> Regards
> Saimadhav Heblikar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/idle-dev/attachments/20140618/75f0d1b3/attachment.html>


More information about the IDLE-dev mailing list