Re: KeyConfig, KeyBinding and other related issues.

Saimadhav Heblikar <[email protected]>
Newsgroups gmane.comp.python.idle
Message-ID <CAO3PiBjq1WS+howtEr5nGu=7Wdqvq8qBbQLrEJRmBd8eEJ_xwQ@mail.gmail.com>
On 15 June 2014 18:09, Tal Einat <[email protected]> wrote:
>
> More importantly, how will you give informative error messages if the
> regexp fails? For example, how will you tell the difference between a
> missing '>', an invalid modifier, and a missing detail? That's the
> downside with a regexp - it either matches or doesn't, and if not you
> can't tell why.
>

As you can see in the above link, simple cases like missing '<' at
start, repeated modifier, missing '>' at end, errors with appropriate
messages are raised.

I now updated the diff file at
https://gist.github.com/sahutd/289d2297eb83a020a6dd.
It can now ascertain which part of (whether modifier, type or detail)
is invalid.
It can also say why it is invalid(Not all reasons are covered ATM,
though it can be done quite easily. Just a matter of checking for that
condition and adding a suitable error message).
See the tests in the same diff for an example.


-- 
Regards
Saimadhav Heblikar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.