On Thu, Dec 9, 2010 at 3:52 PM, Mike Orr <[email protected]> wrote: > On Thu, Dec 9, 2010 at 2:29 PM, Jonathan Gardner > <[email protected]> wrote: >> >> One minor issue: update_params returns unicode. Is this significant? > > On my computer, it returns Unicode only if the original URL is Unicode: > >>>> webhelpers.util.update_params("http://google.com/?q=aasdf", foo="bar") > 'http://google.com/?q=aasdf&foo=bar' >>>> webhelpers.util.update_params(u"http://google.com/?q=aasdf", foo="bar") > u'http://google.com/?q=aasdf&foo=bar' >>>> webhelpers.util.update_params("http://google.com/?q=aasdf", foo=u"bar") > 'http://google.com/?q=aasdf&foo=bar' > > Unicode URLs are invalid, so don't do that. They also aren't > compatible with Routes or url(), although the current version may > stringify url() args for you, I don't remember. >
Yep, the params coming back from request.params.get() are unicode. I need to str-ify them as they come in. I'm glad that url() whines when it gets unicode. > > update_params depend only on the Python standard library, and none of > its literals are Unicode, so I think we'll have to accept this as the > normal Python functionality for URLs. > No complaint here. -- Jonathan Gardner [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.
