[Patches] [ python-Patches-759208 ] curses has_key emulation fix
SourceForge.net
noreply at sourceforge.net
Tue Sep 2 05:52:01 EDT 2003
Patches item #759208, was opened at 2003-06-23 09:14
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=759208&group_id=5470
Category: Library (Lib)
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Mats Wichmann (mwichmann)
Assigned to: A.M. Kuchling (akuchling)
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: A.M. Kuchling (akuchling)
Date: 2003-09-02 07:52
Message:
Logged In: YES
user_id=11375
Checked in as rev. 1.3 of has_key.py; thanks!
----------------------------------------------------------------------
Comment By: Mats Wichmann (mwichmann)
Date: 2003-06-30 23:09
Message:
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.
----------------------------------------------------------------------
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
More information about the Patches
mailing list