summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
authorVytis Banaitis <vytis.banaitis@gmail.com>2017-02-01 18:41:56 +0200
committerTim Graham <timograham@gmail.com>2017-02-01 11:41:56 -0500
commit8838d4dd498c8f66ea4237fe8a79a5f77d6f95c9 (patch)
treeb75fa27930b8758ad36669b523b084ac09ce290b /django/utils/datastructures.py
parent0ec4dc91e0e7befdd06aa0613b5d0fbe3c785ee7 (diff)
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index 8e64328a2c..c15cb5eb49 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -235,12 +235,7 @@ class ImmutableList(tuple):
AttributeError: You cannot mutate this.
"""
- def __new__(cls, *args, **kwargs):
- if 'warning' in kwargs:
- warning = kwargs['warning']
- del kwargs['warning']
- else:
- warning = 'ImmutableList object is immutable.'
+ def __new__(cls, *args, warning='ImmutableList object is immutable.', **kwargs):
self = tuple.__new__(cls, *args, **kwargs)
self.warning = warning
return self