summaryrefslogtreecommitdiff
path: root/django/urls
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2017-12-11 12:08:45 +0000
committerTim Graham <timograham@gmail.com>2017-12-11 07:08:45 -0500
commitd13a9e44ded4e93570c6ba42ec84e45ddca2505b (patch)
tree0df16e6538d8794c39bd62b5a46879b8abe6572c /django/urls
parenta9e5ac823df8ba8b786b6450c967ca378c008d0e (diff)
Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.
Diffstat (limited to 'django/urls')
-rw-r--r--django/urls/resolvers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/urls/resolvers.py b/django/urls/resolvers.py
index 55785a696f..661525c6d1 100644
--- a/django/urls/resolvers.py
+++ b/django/urls/resolvers.py
@@ -440,8 +440,8 @@ class URLResolver:
(
new_matches,
p_pattern + pat,
- dict(defaults, **url_pattern.default_kwargs),
- dict(self.pattern.converters, **converters)
+ {**defaults, **url_pattern.default_kwargs},
+ {**self.pattern.converters, **converters}
)
)
for namespace, (prefix, sub_pattern) in url_pattern.namespace_dict.items():
@@ -500,7 +500,7 @@ class URLResolver:
else:
if sub_match:
# Merge captured arguments in match with submatch
- sub_match_dict = dict(kwargs, **self.default_kwargs)
+ sub_match_dict = {**kwargs, **self.default_kwargs}
# Update the sub_match_dict with the kwargs from the sub_match.
sub_match_dict.update(sub_match.kwargs)
# If there are *any* named groups, ignore all non-named groups.