Top "Yield" questions

yield is (1) a keyword that facilitates creation of generator functions, (2) a Ruby statement to transfer control from one coroutine to another, (3) a Java statement used to yield a value from a switch expression.

What does the "yield" keyword do?

What is the use of the yield keyword in Python, and what does it do? For example, I'm trying to …

python iterator generator yield coroutine
How can I wait In Node.js (JavaScript)? l need to pause for a period of time

I'm developing a console script for personal needs. I need to be able to pause for an extended amount of …

javascript node.js async-await yield
What is the yield keyword used for in C#?

In the How Can I Expose Only a Fragment of IList<> question one of the answers had the …

c# yield
What does "yield break;" do in C#?

I have seen this syntax in MSDN: yield break, but I don't know what it does. Does anyone know?

c# .net yield
What's the yield keyword in JavaScript?

I heard about a "yield" keyword in JavaScript, but I found very poor documentation about it. Can someone explain me (…

javascript yield keyword
In practice, what are the main uses for the new "yield from" syntax in Python 3.3?

I'm having a hard time wrapping my brain around PEP 380. What are the situations where "yield from" is useful? What …

python yield
What is Scala's yield?

I understand Ruby and Python's yield. What does Scala's yield do?

scala functional-programming yield
Resetting generator object in Python

I have a generator object returned by multiple yield. Preparation to call this generator is rather time-consuming operation. That is …

python generator yield
IEnumerable and Recursion using yield return

I have an IEnumerable<T> method that I'm using to find controls in a WebForms page. The method …

c# generics ienumerable yield
How yield catches StopIteration exception?

Why in the example function terminates: def func(iterable): while True: val = next(iterable) yield val but if I take …

python yield stopiteration