<@U6ZRNH0TC> if you use yield once in a method, yo...
# development
h
@aloof-angle-91616 if you use yield once in a method, you turn the whole method into a python generator object, so that makes some sense - but python generator objects can still
return
if you've used
yield
before, can't they?
👍 1
h
Yes. They can still
return
. I don't understand the semantics of that tho
w
they can't return with a value
only a bare return, which is "end of iteration"
👍 1
the python parser checks for
yield
and
return value
being mixed
and will explode
h
It does explode, but the error message is not as informative as this thread has been 🙂 Thanks!