From 8838d4dd498c8f66ea4237fe8a79a5f77d6f95c9 Mon Sep 17 00:00:00 2001 From: Vytis Banaitis Date: Wed, 1 Feb 2017 18:41:56 +0200 Subject: Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. --- django/utils/datastructures.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'django/utils/datastructures.py') 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 -- cgit v1.3