Sergey Astanin committed 6a81133

fix: leak only descriptive local var names from partition()

Comments (0)

Files changed (1)

     cond = condition if condition else bool  # eval as bool if condition is None
     ss = _SplitSeq(cond, sequence)
-    def goods():
+    def condition_holds():
         while 1:
             yield ss.getNext(getGood=True)
-    def bads():
+    def condition_doesnt_hold():
         while 1:
             yield ss.getNext(getGood=False)
-    return goods(), bads()
+    return condition_holds(), condition_doesnt_hold()
 def _take(n, sequence):
     """Take the first n elements of the sequence.