On Mon, Jan 5, 2009 at 1:07 PM, Mike Orr <[email protected]> wrote: > On Mon, Jan 5, 2009 at 12:35 PM, Tycon <[email protected]> wrote: >> >> And I dont like the trailing underscore idea, because it would be a >> mess to deal with in most common use cases like: >> >> params = dict(request.params) >> url = url_for('/page', **params) >> >> With the params dict suggestion this will be written into >> >> url = url_for('/page', params) >> >> But with trailing underscore you would have to do some ugly (and >> expensive) manipulation: > > Ah, that's a good point. (Although it has been this way for years and > nobody has complained about it till now, so I guess using 'host' as a > bona fide parameter is not very common.) > > So what about having a 'params' argument but keeping the current > behavior if 'params' is not set. That would allow backward > compatibility. > > Then if 'params' is set and another argument doesn't correspond to any > path variable, I guess you'd raise an error.
Created Routes ticket #88 for this. http://routes.groovie.org/trac/routes/ticket/88 -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
