Created
July 29, 2016 21:40
-
-
Save lsloan/a02c3fc2cca87a23eabec248e57b7a35 to your computer and use it in GitHub Desktop.
While working on making an efficient way of
getting the course ID if its list of
outcomes includes an outcome with a
specific ID, I came up with these
monstrosities. In the end, they DO make
a list that contains one item if there
is a match. However, the one item is the
outcome object itself, not the course ID. Maybe a little more clever code an…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x2 = list(itertools.ifilterfalse(lambda x: courseID if x.outcome.id != verifiedOutcome.id else False, | |
| courseOutcomesJSONObjects)) # would yield help? | |
| x2 = list(itertools.ifilterfalse(lambda x: x.outcome.id != verifiedOutcome.id, | |
| courseOutcomesJSONObjects)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment