[PEAK] dispatch questions
Phillip J. Eby
pje at telecommunity.com
Mon Mar 14 21:52:48 EST 2005
At 06:34 PM 3/14/05 -0800, Dave Peticolas wrote:
>I realize that when('x != 5') would be a lousy way of specifying the
>default case, but I don't understand why the two outputs would differ
>for the non-default case (x == 5). Also, it now seems that the order
>doesn't change when I use the latest checkout of PEAK. Is this a bug
>that has been fixed or is the order of those two 'before' methods
>undefined?
I recently fixed a bug in strategy.method_list() that had the effect of
making certain method combinations usable only once. I don't know whether
it might also have had the effect you're describing, but I can tell you
that "before" and "after" methods use strategy.method_list() for
combining. So, there's a chance that fixing the one bug also fixed the other.
Aside from this, I should note that the ordering for before and after
methods that are of the same specificity is not well-defined anyway, and
might change in the future. Currently, it's the same as definition order
for "before" methods and reverse definition order for "after" methods, but
I think perhaps it should be the other way around. It seems to me that
methods defined later should be "more before" and "more after" than methods
defined earlier.
More information about the PEAK
mailing list