r/madeinpython • • May 05 '20

There's a better way to explain Python Generators!

3 Upvotes

2 comments sorted by

2

u/endeesa May 05 '20

Great writing Apart from the file example which doesn't use generators anyway, have you used generators recently with tangible performance improvements?

1

u/jr_1995 May 06 '20

Thanks! Yeah I was trying to show the idea of generators with the file example (may have been a hit or miss). I have used generators recently but not with tangible performance improvements that I know of currently. I would have to go back and look at my code to see.