Nikita Popov wrote:
I'll ask again since no one has answered ...
In a different way ...
Is the only thing that changes the 'function' into a 'generator'
the call to process the data with 'yield'? ( That would be
SQL procedure ) ...
So how DOES an IDE work out the flow in order to correctly check that
variables are defined?
As always, my IDE provides a lot of 'sexy' stuff so that I don't
have it built in to the language, and I still can't see how a lot
being loaded in helps with performance which is the only thing that
interested in. Performance wise why is yield better than just directly
calling a function to handle the data?
Lester Caine and Alex Aulbach,
may I ask you to continue this discussion in a separate thread? I am
really interested in constructive responses about the generator RFC,
but your discussion is generating a lot of noise, which makes it very
hard for me to pick out the few mails that are of interest to me.
If you could open a new thread (like "Generator keyword") it would help a lot.
Nikita - I am looking for a well reasoned argument as to why generator has to be added at all! 'Just because it can be' is not a valid argument, but perhaps you could add to the RFC the performance implication or advantage of what is being proposed. That would at least be some comparison with the current methods of doing the same thing?
Anthony had a very good writeup on generators and how they compare to iterators last week: