From 108f026e1dcca554867ff8f7a211a5ce0668a26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 17 Jan 2020 16:27:55 -0500 Subject: avoid invalid escape warning --- docs/narr/urldispatch.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index bc2509e3f..684e64395 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -1190,7 +1190,7 @@ expressions specifying requirements for that marker. For instance: config.add_route_predicate('integers', IntegersPredicate) - config.add_route('ymd', '/{year:\d+}/{month:\d+}/{day:\d+}', + config.add_route('ymd', r'/{year:\d+}/{month:\d+}/{day:\d+}', integers=('year', 'month', 'day')) Now the try/except is no longer needed because the route will not match at all -- cgit v1.2.3