diff --git a/prismic/experiments.py b/prismic/experiments.py index 8e5fd33..7405da4 100644 --- a/prismic/experiments.py +++ b/prismic/experiments.py @@ -23,9 +23,10 @@ def ref_from_cookie(self, cookie): @staticmethod def parse(json): + return Experiments( - map(lambda e: Experiment.parse(e), (json and json.get("draft")) or []), - map(lambda e: Experiment.parse(e), (json and json.get("running")) or []) + [Experiment.parse(e) for e in ((json and json.get("draft") or []))], + [Experiment.parse(e) for e in ((json and json.get("running") or []))] ) @@ -43,7 +44,7 @@ def parse(json): json.get("id"), json.get("googleId"), json.get("name"), - map(lambda v: Variation.parse(v), json.get("variations")) + [Variation.parse(v) for v in json.get("variations")] )