#352: RuleDispatch usage should provide a parameter that is under user control
-------------------------+--------------------------------------------------
 Reporter:  kevin        |        Owner:  anonymous
     Type:  enhancement  |       Status:  closed   
 Priority:  normal       |    Milestone:  0.9      
Component:  TurboGears   |      Version:           
 Severity:  normal       |   Resolution:  fixed    
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by simon):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Added a more or less definitive solution in [1066].

 Any generic function we want to be trivially overridden should be derived
 from turbogears.genericfunctions.MultiorderGenericFunction:

 {{{
 @generic(MultiorderGenericFunction)
 def foo(a, b):
   pass
 }}}

 introducing (optional, default being 0) argument ''order'':

 {{{
 @foo.when("a > 10", order=2)
 def a_gt_10(a, b):
   pass
 }}}

 What this does is alter method combination so that methods are first
 ordered into groups according to ''order'' argument and only then within
 every group by relation "more specific".

 In other words:

   p.order < r.order => p is more specific than r for every pair of rules
 p, r.

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/352>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to