Most voted "yield" questions
The keyword Yield is used to pause and resume a generator. used in several languages providing "generators".
Learn more…12 questions
Sort by count of
-
48
votes3
answers11626
viewsWhat’s the use of the reserved word "Yield"?
What is the use of the keyword (reserved) yield? When and where it is used?
-
29
votes3
answers15296
viewsWhat is Yield for?
I’ve been writing some for some time scripts with Python, in some tutorials I am sometimes presented with the yield, that normally arises in repeat structures commonly while. What is it for? And how…
-
17
votes2
answers653
viewsHow does Python treat the "Yield" command internally?
Was reading on command yield from Python, and it seems to me that this command creates a Generator which would be a kind of data list in which the return on value occurs over demand, as if the last…
-
13
votes3
answers4752
viewsWhat is the difference between 'Yield' and 'Return' in PHP?
I have been trying to remove this doubt, but without success. At first glance they seemed to me similar commands or they would be the same thing. After seeing some explanations, I was a little…
-
9
votes1
answer1798
viewsWhat are the advantages of using a "Generator" (Yield) in PHP?
As of PHP 5.5, the Generator. It can be used within a function from the keyword yield. In the manual, we have an example where one is compared to function range(0, 1000000) (that theoretically would…
-
7
votes1
answer253
viewsDifference between Yield and Yield* operators in Ecmascript 6.0 "Harmony"?
I’m studying the use of generators in Ecmascript 6.0 "Harmony". I have already managed to understand its basic functioning, like the statement through the syntax function* () { ... } and value…
-
6
votes1
answer384
viewsHow to read/translate the Yield keyword?
I’m studying about the keyword Yield in C#, and I have this question: how to read this word in Portuguese (structured?). Would something like "return the current value of the enumerator"? Wouldn’t…
-
5
votes2
answers281
viewsYield Return inside a using
Consider the following situation: public class MeuRecursoBemCaro : IDisposable { public T FazerOperacaoBemCara(T item) { //Do operação } public void Dispose() { //Dispose logic } } public…
-
5
votes1
answer216
viewsYield does not return data
When calling the method, an HTML component enumerable should be returned. I’m using the HTML Agility Pack to read an HTML file. The same method works as expected when removing the yield and add…
-
5
votes2
answers323
viewsPython reserved word Yield
What is the difference between the following codes ? def bottom(): yield 42 def bottom(): return (yield 42)
-
3
votes2
answers60
viewsHow to "simulate" a Generator in versions prior to PHP 5.5?
From PHP 5.5 we can use yield instead of return functions and, with this, we create Generators. The reasons for using the yield can be seen here What are the advantages of using a Generator (Yield)…
-
0
votes0
answers24
viewsPython - Scrapy - Return nested Json (Json’s List)
Hello, I’m having a problem generating a dictionary answer within another dictionary. I have a home page that contains 8 bimonthly programs, in these picked up their respective links and properties.…