On 04/02/2015 02:52 PM, Danny Yoo wrote:
<SNIP>
This is not to say that closures are bad.  It's just to point out that
just because functional programs use closures quite a lot, doesn't
automatically mean closures are the most appropriate tool for
everything.  If there are parts of the language that already do the
sort of thing you're trying to accomplish, it might be good to reuse
those parts, rather than reinvent the universe.
I agree that closures are not the best tool for every job. And in the case of a callback based GUI they simply do not work, since execution needs to leave a function in order to run the GUI's main loop. Thus I abused a coroutine.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to