Felix Schwarz wrote: > > I spent some hours for this task and came to the conclusion, that we > can't implement this easily. The details are documented in the ticket > (together with a naive implementation): > http://trac.turbogears.org/ticket/1587#comment:2 > > If you have an idea, how to solve the problem for TurboGears+CherryPy > please drop me a line.
I think turbogears.util.to_kw and turbogears.util.from_kw would solve the positional parameters issue. Something like this: args, kw = to_kw(func, args, kw) # all params inside kw kw = decode(kw) kw = validate(kw) args, kw = from_kw(func, args, kw) # positional params back to args Regarding you're comment that the decoding should finally be done in validate I obviously agree ;). I think that in this case the decorator order might not be a problem since I believe expose() doesn't really need decoded arguments anyway so it's not much of a problem if it's stacked above or below validate(). However, since it might affect existing projects in un-anticipated ways maybe this change should really go into 1.1 where a *little* breakage is expected. Thanks for looking into this! :) Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
