def minimize():
current = yield
while True:
value = yield current # what is this????
current = min(value, current)
I got this piece of code from here. Here is the quote:
" The generator function receives the value passed to the send function as the result of the corresponding yield expression."
note: it says yeild expression, which mean the whole "yield current" thing. Is my understanding correct? If so, why not just use "yield", removing "current" from the expression??