On Sun, 2008-07-20 at 21:37 +0200, Johannes Dollinger wrote:
> I'd prefer treating unquoted parameters as variables.

We've already had this thread in the past. It's really up to Adrian and
Jacob now, although technically, the decision's been made: there just
isn't the interest to change and it would break a lot of code to do so
without a huge benefit (since the alternate behaviour is easy to have in
any case).

>  If that's not  
> possible make url accept a quoted view name and deprecate unquoted  
> view names.
> 
> Especially unquoted non-ascii strings (as in test url05) are ugly 

Subjective; not a technical reason. Non-ASCII strings look just the same
as ASCII strings. In fact, many non-Latin scripts are much prettier than
the Latin alphabet (just as subjective as your opinion, of course :-)).

> and  
> would require hacks or re.LOCALE in my approach in #7806.

That would suggest a problem in the approach in that patch. :-)

There's more than one template tag in Django that treats unquoted
strings of characters as non-literals, although the url tag may be the
only one at the moment where non-ASCII strings are fairly natural. We
shouldn't rule them out, though. That needs to be handled by any
template parsing code. Non-ASCII strings are just as easy to handle as
ASCII strings in code. If you're at the point of thinking you need to
use re.LOCALE, it suggests you're trying to be too strict in the error
checking and loosening that up a bit would be faster, lead to easier to
read code and avoid difficulties like this.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to