On 11/30/2011 10:49 PM, Matt Joiner wrote:
def possible_names():
     yield "foo"
     for i in range(20):
         yield "foo-" + str(i)

This is my favorite -- crystal clear with only the variable part variable. And it works in both 2.x and 3.x.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to