diff options
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/feedgenerator.py | 9 | ||||
| -rw-r--r-- | django/utils/functional.py | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index ec01d02697..a0f63901c7 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -102,8 +102,8 @@ class SyndicationFeed: 'feed_copyright': to_str(feed_copyright), 'id': feed_guid or link, 'ttl': to_str(ttl), + **kwargs, } - self.feed.update(kwargs) self.items = [] def add_item(self, title, link, description, author_email=None, @@ -119,7 +119,7 @@ class SyndicationFeed: return str(s) if s is not None else s if categories: categories = [to_str(c) for c in categories] - item = { + self.items.append({ 'title': to_str(title), 'link': iri_to_uri(link), 'description': to_str(description), @@ -135,9 +135,8 @@ class SyndicationFeed: 'categories': categories or (), 'item_copyright': to_str(item_copyright), 'ttl': to_str(ttl), - } - item.update(kwargs) - self.items.append(item) + **kwargs, + }) def num_items(self): return len(self.items) diff --git a/django/utils/functional.py b/django/utils/functional.py index af49322559..dcc8e87f77 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -9,7 +9,7 @@ from functools import total_ordering, wraps # CPython) is a type and its instances don't bind. def curry(_curried_func, *args, **kwargs): def _curried(*moreargs, **morekwargs): - return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs)) + return _curried_func(*(args + moreargs), **{**kwargs, **morekwargs}) return _curried |
