From 439cb4047fb583d08149f28e2ce66a8edfe0efa7 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Thu, 26 Apr 2007 13:30:48 +0000 Subject: Fixed #4040 -- Changed uses of has_key() to "in". Slight performance improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/oldforms/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/oldforms') diff --git a/django/oldforms/__init__.py b/django/oldforms/__init__.py index 873bd0204a..0a4676ee8f 100644 --- a/django/oldforms/__init__.py +++ b/django/oldforms/__init__.py @@ -329,7 +329,7 @@ class FormField(object): def convert_post_data(self, new_data): name = self.get_member_name() - if new_data.has_key(self.field_name): + if self.field_name in new_data: d = new_data.getlist(self.field_name) try: converted_data = [self.__class__.html2python(data) for data in d] -- cgit v1.3