Sorry for jumping in to this a little late, but...
> This is (IMO) more elegant:
> def neverEndingStatus():
> index = 0
> statusChars = ['|', '\\', '-', '/']
> while True:
> yield statusChars[index]
> index = (index + 1) % 4
Why not go a step further?
def neverEndingStatus():
statusChars = ['|', '\\', '-', '/']
while True:
for char in statusChars:
yield char
or
def neverEndingStatus():
while True:
yield '|'
yield '\\'
yield '-'
yield '/'
Later,
Blake.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor