[Python-ideas] keyword for introducing generators

Neil Girdhar mistersheik at gmail.com
Sat Aug 16 23:46:42 CEST 2014


I'm sure this has been suggested before, but I just spent two days trying 
to figure out why a method wasn't being called only to find that I'd 
accidentally pasted a yield into the function.  What is the argument 
against a different keyword for introducing generator functions/methods?

If it's backward compatibility, then my suggestion to have a from 
__future__ and then make it real in Python 4.

Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140816/671279ad/attachment.html>


More information about the Python-ideas mailing list