Generator naming convention?
g.brandl-nospam at gmx.net
Thu Jun 29 09:37:16 CEST 2006
aurora00 at gmail.com 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:
> 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
More information about the Python-list