Some possibilities:

1. Use a different name for the new function.

    path('/users/<int:pk>/')

Actually `path` is pretty valid as a name there - that's *exactly* what it 
represents - the path portion of the URL.
Alternately `route`?

2. Keep `url` for both styles, but with a really simple determination 
between regexs/typed urls.

    The pattern *must* start with either `^` or `/`.  (Include a 
`regex_url` and `typed_url` for the explicit cases)

3. As per (2) but additionally have the usage of regexs in `url(...)` be 
placed on the deprecation path.

I think (1) is probably my favorite choice of those, but I'm open to 
discussion.
That'd give us `from django.conf import path`, and `from django.conf import 
regex_path`. The existing `from django.conf.urls import url` would keep the 
existing behavior but move towards deprecation.

I'm very strongly in favor of keeping Flask's style for "<type:name>".
Considering the wider ecosystem, the choice between having Python's two 
biggest web frameworks share the same routing syntax vs. having them share 
subtly different syntaxes is pretty clear.
I think that's a far bigger concern that if the routing syntax echos 
Python's type hinting syntax or not.

To me, the alternative reads like this:

A: "Hey folks! Django's got a new routing sytnax!"
B: "Great what's it like?"
A: "Exactly the same as Flask. Oh, but we've reversed two of the arguments 
around."
B: "Uh, WTF?"

Cheers for the input everyone,

  Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7550dd77-ef22-4b92-b42e-aad6116ffc84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to