PEP 0479, https://www.python.org/dev/peps/pep-0479/, makes the
following change: "when StopIteration is raised inside a generator,
it is replaced it with RuntimeError".
The PEP suggests that if raise StopIteration occurs directly in a
generator, simply replace it with return.
Reviewed: https:/ /review. openstack. org/583297 /git.openstack. org/cgit/ openstack/ designate/ commit/ ?id=19b8a6e852d a4e2f6b4236e502 ed625b7869c271
Committed: https:/
Submitter: Zuul
Branch: master
commit 19b8a6e852da4e2 f6b4236e502ed62 5b7869c271
Author: Corey Bryant <email address hidden>
Date: Tue Jul 17 09:14:55 2018 -0400
Replace StopIteration with return for PEP 0479
PEP 0479, https:/ /www.python. org/dev/ peps/pep- 0479/, makes the
following change: "when StopIteration is raised inside a generator,
it is replaced it with RuntimeError".
The PEP suggests that if raise StopIteration occurs directly in a
generator, simply replace it with return.
Change-Id: I9bb72936c8d56b 338084bb0be7e75 aecdf09f8b3
Closes-Bug: #1780827