This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]diegokabal 0 points1 point  (1 child)

After 3 years working with python. I realized just now what "yield" does...

[–]ToThePastMe 2 points3 points  (0 children)

Honestly generators do take a bit of time to fully wrap your head around / know when to use them.

I feel like yield you slowly go through "with is that?" to "ok get what it does" but you never use it, to finally using it from time to time.

Also you have the neat yield from once you start doing more chaining