Commits

Aleš Erjavec  committed 10d0d6b

Fixed an error when initializing a GeneSet from an iterator.

  • Participants
  • Parent commits 3ddb8a2

Comments (0)

Files changed (1)

File obiGeneSets.py

         if isinstance(input, obiGeneSets.GeneSets):
             super(GeneSets, self).update(input)
         elif hasattr(input, "items"):
-            for i,g in input.items():
-                self.add(obiGeneSets.GeneSet(pair=(i,g)))
+            for i, g in input.items():
+                self.add(obiGeneSets.GeneSet(pair=(i, g)))
         else:
             for i in input:
                 if isinstance(i, obiGeneSets.GeneSet):
                     self.add(i)
                 else:
-                    i,j = i
-                    self.add(obiGeneSets.GeneSet(pair=(i,g)))
+                    i, g = i
+                    self.add(obiGeneSets.GeneSet(pair=(i, g)))
 
     def to_odict(self):
         """ Return gene sets in old dictionary format. """