[issue35966] Didn't raise "StopIteration" Error when I use "yield" in the function

2019-02-11 Thread sheiun
sheiun added the comment: But it still can catch by using try/except >>> def generate_loop_stopiteration(): ... for i in range(10): ... print(i) ... # should raise StopIteration when i > 5 ... try: ... k = next(j for j in range(

[issue35966] Didn't raise "StopIteration" Error when I use "yield" in the function

2019-02-11 Thread sheiun
Change by sheiun : -- nosy: -sheiun ___ Python tracker <https://bugs.python.org/issue35966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35966] Didn't raise "StopIteration" Error when I use "yield" in the function

2019-02-11 Thread sheiun
New submission from sheiun : Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def generate_loop()