Re:Callbacks as our Generation's Goto Statement
by ak217 on Thursday August 15, 2013 @07:39PM
(#6221306)
Yes! I really hope this use of yield will bubble up to the language spec and become pervasive in Python. It really strikes me as the Pythonic approach to solving callback hell.
[ Parent
| on HN ]
Re:Callbacks as our Generation's Goto Statement
by masklinn on Friday August 16, 2013 @03:41AM
(#6222680)
> Yes! I really hope this use of yield will bubble up to the language spec and become pervasive in Python.
And the time machine spaketh: http://www.python.org/dev/peps/pep-3156/#coroutines-and-the-...
(it has no reason to "bubble up to the language spec", the language provides all the right primitives — especially with Python 3's `yield from`, it's up to the libraries to use them. That is a Good Thing.)