Gustavo J. A. M. Carneiro wrote:
> I don't suppose there could be a way to make the yield inside the
> subfunction have the same effect as if it was inside the function that
> called it? Perhaps some special notation, either at function calling or
> at function definition?
You mean like a for loop? ;)
def show_message(msg):
win = create_window(msg)
for step in animate(win, xrange(10)): # slide down
yield step
yield Timeout(3)
for step in animate(win, xrange(10, 0, -1)): # slide up
yield step
win.destroy()
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.blogspot.com
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com