Python Generators

  • 2018-08-07 06:10 AM
  • 71

Generators were a compelling feature when added to Python 2.2 in seventeen years ago with PEP-255. When they were enhanced to become coroutines with PEP-342, they gained additional capabilities for modelling common problems. But, surprisingly, we don't often see generators discussed as a core tool in the data scientist, computational scientist, and data engineer's toolkit. Why not?