def letters():
a = xrange(ord('a'), ord('z')+1)
B = xrange(ord('A'), ord('Z')+1)
while True:
yield chr(a)
yield chr(B)
>>> l = letters()
>>> l.next()
Traceback (most recent call last):
File "<pyshell#225>", line 1, in <module>
l.next()
File "<pyshell#223>", line 5, in letters
yield chr(a)
TypeError: an integer is required
>>>
Any way to get around this?
--
http://mail.python.org/mailman/listinfo/python-list
