From 8e32d493480d7783fcbeb491284fde4bae2d09e4 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Fri, 13 May 2016 19:47:15 -0400 Subject: [PATCH] MAINT: Just use a genexpr instead of map(partial). --- zipline/pipeline/factors/factor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zipline/pipeline/factors/factor.py b/zipline/pipeline/factors/factor.py index b14a4a0f..85ccb1e6 100644 --- a/zipline/pipeline/factors/factor.py +++ b/zipline/pipeline/factors/factor.py @@ -1,7 +1,7 @@ """ factor.py """ -from functools import partial, wraps +from functools import wraps from operator import attrgetter from numbers import Number @@ -1224,8 +1224,7 @@ class CustomFactor(PositiveWindowLengthMixin, CustomTermMixin, Factor): factor=type(self).__name__, ) ) - RecarrayField_ = partial(RecarrayField, self) - return iter(map(RecarrayField_, self.outputs)) + return (RecarrayField(self, attr) for attr in self.outputs) class RecarrayField(SingleInputMixin, Factor):