Generator naming convention?

aurora00 at gmail.com aurora00 at gmail.com
Thu Jun 29 01:21:04 CEST 2006


iter- clicks for me, thanks :)

wy


infidel wrote:
> > 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