News for hackers. Stuff that matters.
Re:How Hy backported “yield from” to Python 2 by kazinator on Friday November 21, 2014 @02:20PM (#8642820)
Yes, and that really highlights the limitation of using the Python syntactic interface to its implementation, compared to a Lisp interface.

However, even if the Lisp approach cannot be used directly, it still provides proof-of-concept evidence. If a macro in the programmable-syntax interface to the machine can achieve the feature, then in all likelihood, the feature could be also implemented as a similar hack in the Python parser where the equivalent of that macro is implemented as a hard-coded phrase grammar rule.

Of course, deploying such a change is cumbersome because installations have to update their Python images to the patched ones. Oops! Whereas the Hy installation doesn't have to be upgraded in order for a new macro to be used by a program.

Re:How Hy backported “yield from” to Python 2 by icebraining on Friday November 21, 2014 @04:57PM (#8643614)
The Python interpreter has support for custom code loaders, so you can use the new macro using plain Python, as long as the macro machinery is loaded before the other code to set it up.

See importlib: https://docs.python.org/3.1/library/importlib.html