]> granicus.if.org Git - python/commitdiff
Merge 60627.
authorRaymond Hettinger <python@rcn.com>
Thu, 7 Feb 2008 03:10:33 +0000 (03:10 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 7 Feb 2008 03:10:33 +0000 (03:10 +0000)
Lib/_abcoll.py

index 0519d42335bf11468e3470eba78211607871770c..6c27e66be5f45c9e6f5d0eaf42b84b33a8bbb0ad 100644 (file)
@@ -170,7 +170,12 @@ class Set:
 
     @classmethod
     def _from_iterable(cls, it):
-        return frozenset(it)
+        '''Construct an instance of the class from any iterable input.
+
+        Must override this method if the class constructor signature
+        will not accept a frozenset for an input.
+        '''
+        return cls(frozenset(it))
 
     def __and__(self, other):
         if not isinstance(other, Iterable):