Dear all, For my work, I needed a python sandbox which contained the 'await' keyword for asynchronous programming, just like c# does. I found it very easy to extend the 2.7 grammar and include this keyword. https://bitbucket.org/jonathanslenders/pypy Personally, I think this is a very clean solution for Twisted's @defer.inlineCalbacks, Tornado's @gen.engine, and similar functions in other async frameworks. Just sharing this information, but I'd also like to know whether Python code developers would consider to implement this in the Python standard language. (maybe Python 3000.) I really have no idea what steps are taken before accepting new grammar, but I'm willing to defend this syntax or to write some articles about it. Cheers, Jonathan
2012/12/20 Jonathan Slenders <jonathan@slenders.be>:
Personally, I think this is a very clean solution for Twisted's @defer.inlineCalbacks, Tornado's @gen.engine, and similar functions in other async frameworks.
Just sharing this information, but I'd also like to know whether Python code developers would consider to implement this in the Python standard language. (maybe Python 3000.) I really have no idea what steps are taken before accepting new grammar, but I'm willing to defend this syntax or to write some articles about it.
That would be an issue for the python-ideas mailing list. -- Regards, Benjamin
Hi Jonathan, On Thu, Dec 20, 2012 at 11:11 PM, Benjamin Peterson <benjamin@python.org> wrote:
2012/12/20 Jonathan Slenders <jonathan@slenders.be>:
Personally, I think this is a very clean solution for Twisted's @defer.inlineCalbacks, Tornado's @gen.engine, and similar functions in other async frameworks.
Just sharing this information, but I'd also like to know whether Python code developers would consider to implement this in the Python standard language. (maybe Python 3000.) I really have no idea what steps are taken before accepting new grammar, but I'm willing to defend this syntax or to write some articles about it.
That would be an issue for the python-ideas mailing list.
To expand on Benjamin's answer: we do welcome people that use PyPy to play with syntax extensions. However we're not going to do small language extensions in ways incompatible with Python as implemented by CPython. That's why you should discuss your idea starting from the python-ideas mailing list. It is a plus if you have a working prototype already, discuss it on your own blog, even use it already in medium-scale projects. But I warn you, adding new keywords is tough. :-) A bientôt, Armin.
On Fri, Dec 21, 2012 at 10:05 +0100, Armin Rigo wrote:
Hi Jonathan,
On Thu, Dec 20, 2012 at 11:11 PM, Benjamin Peterson <benjamin@python.org> wrote:
2012/12/20 Jonathan Slenders <jonathan@slenders.be>:
Personally, I think this is a very clean solution for Twisted's @defer.inlineCalbacks, Tornado's @gen.engine, and similar functions in other async frameworks.
Just sharing this information, but I'd also like to know whether Python code developers would consider to implement this in the Python standard language. (maybe Python 3000.) I really have no idea what steps are taken before accepting new grammar, but I'm willing to defend this syntax or to write some articles about it.
That would be an issue for the python-ideas mailing list.
To expand on Benjamin's answer: we do welcome people that use PyPy to play with syntax extensions. However we're not going to do small language extensions in ways incompatible with Python as implemented by CPython. That's why you should discuss your idea starting from the python-ideas mailing list. It is a plus if you have a working prototype already, discuss it on your own blog, even use it already in medium-scale projects. But I warn you, adding new keywords is tough. :-)
adding to that, there is a recent maybe related PEP draft from Guido about async IO, see here: http://www.python.org/dev/peps/pep-3156/ holger
participants (4)
-
Armin Rigo -
Benjamin Peterson -
holger krekel -
Jonathan Slenders