Generator naming convention?

infidel saint.infidel at gmail.com
Thu Jun 29 00:28:12 CEST 2006


> Any idea? Do you have a naming convention for generators?

Sometimes I use the prefix 'iter', like dictionaries have .items() and
.iteritems().  sometimes I use 'x', like range() vs. xrange().  You
could simply use 'i' like some of the functions in the iteritems module
(imap(), izip(), etc).  I guess it depends on the project, what you're
doing, your mood at the moment, and the alignment of Jupiter and
Mercury in Aquarius.




More information about the Python-list mailing list