diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index cb12586..e317c8a 100644
a
|
b
|
class SelectMultiple(Select):
|
589 | 589 | data = [] |
590 | 590 | if len(initial) != len(data): |
591 | 591 | return True |
592 | | for value1, value2 in zip(initial, data): |
593 | | if force_unicode(value1) != force_unicode(value2): |
594 | | return True |
595 | | return False |
| 592 | initial_set = set([force_unicode(value) for value in initial]) |
| 593 | data_set = set([force_unicode(value) for value in data]) |
| 594 | return data_set != initial_set: |
596 | 595 | |
597 | 596 | class RadioInput(StrAndUnicode): |
598 | 597 | """ |
diff --git a/tests/regressiontests/forms/widgets.py b/tests/regressiontests/forms/widgets.py
index 2c21d19..0997372 100644
a
|
b
|
False
|
673 | 673 | True |
674 | 674 | >>> w._has_changed([1, 2], [u'1', u'3']) |
675 | 675 | True |
| 676 | >>> w._has_changed([2, 1], [u'1', u'2']) |
| 677 | False |
676 | 678 | |
677 | 679 | # Choices can be nested one level in order to create HTML optgroups: |
678 | 680 | >>> w.choices = (('outer1', 'Outer 1'), ('Group "1"', (('inner1', 'Inner 1'), ('inner2', 'Inner 2')))) |