2010/11/19 Ben Bangert <b...@groovie.org>: > Actually, routehelper was going to pre-parse the pattern for > conversion-marker-in-pattern and toss in the appropriate marker._regex and > then put a matching predicate for the converter into the route predicates. > But calling more functions for *every single route* when a simple regular > expression bit that was already called to match.... could've kicked it out. > It's just such horrible inefficiency I could never in good conscious propose > anyone actually use it.
So how about just letting routehelpers toss in the appropriate regex and pass it to Routes. Then when a request comes in, let Routes find a match, resolve the controller/action and url parts that are assigned to converter functions (such as month_converter) are converted before passing them as arguments to the action. Pretty much as if you had a type-checker decorator around your action, such as: http://code.activestate.com/recipes/454322-type-checking-decorator/ This means that, internally, routehelpers must sit between Routes and the action call to catch arguments and convert them, if necessary. (does that makes sense?) -- Alex | twitter.com/alexconrad -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-de...@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.