[PEAK] dispatch bug

Phillip J. Eby pje at telecommunity.com
Thu Feb 10 23:07:14 EST 2005


At 06:44 PM 2/10/05 +0100, Radek Kanovsky wrote:
>Hi,
>
>following generic function doesn't raise NoApplicableMethods exception
>for 'object' as argument but fails with KeyError exception. This has
>something to do with recent optimizations but I am not able to say where
>is the problem yet.

It was in CriterionIndex; it didn't generate entries for non-match 
conditions if all methods at the current dispatch node "cared" about the 
current criterion.  This problem was introduced when I changed the scanning 
sequence for generating a dispatch node.  The old technique walked through 
all keys (seeds) and filtered the list of applicable methods, so there was 
always an entry for every seed.  The new technique walks through the 
methods and then adds them to the lists for seeds that they match, which is 
a lot faster but it wasn't including seeds that no method matched.  The fix 
was quite minor, though.  Thanks for the report.




More information about the PEAK mailing list