[Patches] [ python-Patches-759208 ] curses has_key emulation fix
SourceForge.net
noreply@sourceforge.net
Mon, 30 Jun 2003 09:11:22 -0700
Patches item #759208, was opened at 2003-06-23 09:14
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=759208&group_id=5470
Category: Library (Lib)
Group: None
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Mats Wichmann (mwichmann)
Assigned to: Nobody/Anonymous (nobody)
Summary: curses has_key emulation fix
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-06-30 12:11
Message:
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
)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=759208&group_id=5470