From [PEP 479](https://www.python.org/dev/peps/pep-0479/) the correct way to
terminate a generator is to return (which implicitly raises StopIteration)
rather than raise StopIteration.
Without this change using sqlalchemy in python 3.5 or greater results in
these warnings
PendingDeprecationWarning: generator '__iter__' raised StopIteration
which this commit should remove.
while True:
row = self.fetchone()
if row is None:
- raise StopIteration
+ return
else:
yield row
for member in self.col:
yield self._get(member)
- raise StopIteration
+ return
def append(self, value):
item = self._create(value)
"""
for member in self.col:
yield self._get(member)
- raise StopIteration
+ return
def add(self, value):
if value not in self: