[EMAIL PROTECTED] wrote: > I use generators a lot. E.g. > > > def gen_words(text) > ... parse text ... > yield each word in text > > for word in gen_words(text): > print word > > > I don't like the name gen_xxx() very much. Looking for some inspiration > to name generators. Here are some of my ideas: > > enumerate_words > gen_words > generate_words > parse_words > walk_words > > Any idea? Do you have a naming convention for generators?
If it's not a short one where you can see the whole body immediately, I think it's more important to mention the generator-ness in the docstring. Georg -- http://mail.python.org/mailman/listinfo/python-list