Whole file

viralogic/py-enumerable

The author described this change as Issue #14 - fixed bug in except_. It counts as a record because the check below fails on the code as it stood at 872fe09dc and passes on 0cf796bfd, with nothing else changed between the two runs.

Fix saved2018-12-05
Sharing licenceMIT · LICENSE
Change size+4 4

What the code was meant to do, written into the code itself as a save note

Issue #14 - fixed bug in except_

The change

493493 if not isinstance(enumerable, Enumerable):
494494 raise TypeError(
495495 u"enumerable parameter must be an instance of Enumerable")
496- membership = (
497- 0 if key(element) in enumerable.intersect(self).select(key) else 1
496+ membership = [
497+ 0 if key(element) in enumerable.intersect(self, key).select(key) else 1
498498 for element in self
499- )
499+ ]
500500 return Enumerable(itertools.compress(self, membership))
501501
502502 def contains(self, element, key=lambda x: x):
996996 raise TypeError(
997997 u"enumerable parameter must be an instance of Enumerable")
998998 membership = (
999- 0 if key(element) in enumerable.intersect(self).select(key) else 1
999+ 0 if key(element) in enumerable.intersect(self, key).select(key) else 1
10001000 for element in self
10011001 )
10021002 return Enumerable3(

The check that tells the two apart

failpass·tests/test_functions.py::TestFunctions::test_marks_except

Check file tests/test_functions.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it872fe09dcdb6edf957e8ab806a0ceab140eba24b
Broken version dated2018-11-16
Modulepy_linq.py_linq
Units changedEnumerable, Enumerable3
Fingerprint325549a98bcb9d14
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.