Re: Should reverse() return a Unicode string?

2014-09-19 Thread Jon Dufresne
On Fri, Sep 19, 2014 at 5:13 AM, Tom Christie wrote: > One point of clarity is that we ought to return the same type for each of > `reverse`, `request.path`, `request.get_full_path`, `request.path_info`, and > the values in the `request.GET` dictionary. Given that, the

Re: Should reverse() return a Unicode string?

2014-09-19 Thread Tom Christie
An > > example would be presenting a URL inside a HTML template, (as an href > > or as text), mail, or JSON. > > > > In my opinion, reverse() should return a Unicode string, even if that > > string consists only of ASCII characters. It is not

Re: Should reverse() return a Unicode string?

2014-09-18 Thread Wim Feijen
Please do. :) - Wim On Thursday, 18 September 2014 22:01:21 UTC+2, Jon Dufresne wrote: > > What do you think? If others agree, I can file a bug and create a pull > request to fix this. > > -- You received this message because you are subscribed to the Google Groups "Django developers"

Re: Should reverse() return a Unicode string?

2014-09-18 Thread Carl Meyer
ref > or as text), mail, or JSON. > > In my opinion, reverse() should return a Unicode string, even if that > string consists only of ASCII characters. It is not until the string > hits the wire that it ought to be forced to bytes. > > To verify this, I have created a

Should reverse() return a Unicode string?

2014-09-18 Thread Jon Dufresne
often used to grab a URL and handle it at the application layer. It is not reserved only for the protocol layer. An example would be presenting a URL inside a HTML template, (as an href or as text), mail, or JSON. In my opinion, reverse() should return a Unicode string, even if that string con