mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Eliminated lots of mutable default arguments (since they are bugs
waiting to happen and are memory leaks too). git-svn-id: http://code.djangoproject.com/svn/django/trunk@3070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -399,7 +399,8 @@ class AnyValidator:
|
||||
as a validation error. The message is rather unspecific, so it's best to
|
||||
specify one on instantiation.
|
||||
"""
|
||||
def __init__(self, validator_list=[], error_message=gettext_lazy("This field is invalid.")):
|
||||
def __init__(self, validator_list=None, error_message=gettext_lazy("This field is invalid.")):
|
||||
if validator_list is None: validator_list = []
|
||||
self.validator_list = validator_list
|
||||
self.error_message = error_message
|
||||
for v in validator_list:
|
||||
|
||||
Reference in New Issue
Block a user