From 58a454afbf4dabb1c151ac28adcae0b0c348841a Mon Sep 17 00:00:00 2001 From: EricWang Date: Fri, 31 Mar 2017 10:59:56 +0800 Subject: [PATCH] bug fixed --- rqalpha/utils/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rqalpha/utils/__init__.py b/rqalpha/utils/__init__.py index 29fbbe8c5..f5ee8744c 100644 --- a/rqalpha/utils/__init__.py +++ b/rqalpha/utils/__init__.py @@ -57,12 +57,17 @@ def __repr__(self): return pprint.pformat(self.__dict__) def __iter__(self): - for k, v in six.iteritems(self.__dict__): - yield k, v + for k in self.__dict__.keys(): + yield k def update(self, other): RqAttrDict._update_dict_recursive(self, other) + def items(self): + return six.iteritems(self.__dict__) + + iteritems = items + @staticmethod def _update_dict_recursive(target, other): if isinstance(other, RqAttrDict):