Hoist repeated code outside conditional statement

This commit is contained in:
Brian Pepple 2020-09-27 11:48:21 -04:00 committed by Odd Stråbø
parent 9d64ca41cb
commit f6eeb49bd1

View file

@ -125,11 +125,10 @@ class Objects(object):
obj = self.__recursive__(obj, first)
if obj:
if rest:
for item in obj:
for item in obj:
if rest:
self.__recursiveloop__(item, rest)
else:
for item in obj:
else:
yield item
def __recursive__(self, obj, keys):