diff options
Diffstat (limited to 'django/utils/datastructures.py')
| -rw-r--r-- | django/utils/datastructures.py | 7 |
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 |
