4 ms·
Actually, this is why yield is such an excellent word. If you yield X from a generator, that does two things: 1. Produce the value X from the generator. 2. Yi
by jules 14y ago
Actually, this is why yield is such an excellent word. If you yield X from a generator, that does two things:
1. Produce the value X from the generator.
2. Yield execution to the calling context.
i.e. exactly the two meanings of yield.