[Patches] [ python-Patches-515015 ] inspect.py raise exception if code not found

noreply@sourceforge.net noreply@sourceforge.net
Sat, 09 Feb 2002 06:16:40 -0800


Patches item #515015, was opened at 2002-02-08 14:00
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=515015&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
>Summary: inspect.py raise exception if code not found

Initial Comment:
there is a comment which says the suffixes should
be sorted by length, but there is no comparison
function.

this patch adds a comparison (lambda).

also, there are two functions which are documented
to return IOError if there are problems, but
if the function reaches the end, there were
no raises.  This patch adds raise IOErrors.

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-02-09 06:16

Message:
Logged In: YES 
user_id=33168

Sorry, I saw the map/lambda above, but misread the code.
Attached is a new file (just contains the 2 raises).

I really need to add a test for this as well.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-02-08 15:10

Message:
Logged In: YES 
user_id=31435

Please remove the lambda trick from the patch.  The comment 
is explaining why the negation of the length is the first 
element of the tuples being sorted (that's what guarantees 
the longest suffix is checked first in case of overlap).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=515015&group_id=5470