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.

classification
Title: curses has_key emulation fix
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, gvanrossum, mwichmann
Priority: normal Keywords: patch

Created on 2003-06-23 13:14 by mwichmann, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
curses_has_key.diff mwichmann, 2003-06-23 13:14
Messages (4)
msg44095 - (view) Author: Mats Wichmann (mwichmann) * Date: 2003-06-23 13:14
curses/has_key.py provides emulation for the ncurses 
has_key routine for those that don't have it.  Out-of-
range has_key requests cause a KeyError exception. 
Note that the curses regression test makes such a 
request! The attached trivial patch makes has_key more 
robust.
msg44096 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-06-30 16:11
Logged In: YES 
user_id=6380

Looks harmless to me.  Somebody please check this in.

(Personally, I'd change the logic around so it reads:

if not _capability_names.has_key(ch): return 0

)
msg44097 - (view) Author: Mats Wichmann (mwichmann) * Date: 2003-07-01 03:09
Logged In: YES 
user_id=53605

I certainly have no objection to the logic change, but don't 
have time right now to gen a new patch. Should be an easy 
manual change.
msg44098 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-09-02 11:52
Logged In: YES 
user_id=11375

Checked in as rev. 1.3 of has_key.py; thanks!
History
Date User Action Args
2022-04-10 16:09:24adminsetgithub: 38702
2003-06-23 13:14:31mwichmanncreate