curses module has_key emulation
June 20, 2003
12:50 p.m.
I've been heading down a twisted path that's led me to run the curses regression test on a build that's been forced to use the curses has_key emulation code. It fails on the "has_key(13)" line in the test, and the has_key.py code looks questionable to me: it does: capability_name = _capability_names[ch] if _curses.tigetstr(capability_name): return 1 else: return 0 The keys in the _capability_names dictionary are taken from the curses keycodes and are in the range octal 0400 to 0777, so the dictionary lookup on a key of 13 takes a KeyError exception - which is not caught, as can be seen above. Any thoughts?
8393
Age (days ago)
8393
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mats Wichmann