Andy Sy wrote: > I don't know about you, but with the addition of send() to deal with > the problem outlined in PEP 342, generators are starting to look more > and more like a Rube Goldberg contraption. Could anything be more > Pythonic than Io's: > > f := url @fetch // f is a future that will eventually hold the > // URL's contents, but you don't block on the fetch.
There's a lot more to this than syntax. The oddities surrounding Python generators are mostly due to their "one-level-deep" nature, i.e. they're not full coroutines. And there are deep implementation reasons for that. If syntax is all you're concerned about, you could translate that into Python as something like f = url(future(fetch)) Now, how is that future() function going to be implemented, again? :-) -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com