The semantics could be the same while the execution plan is different, just like numba compiled code runs with the same semantics as the original.
A better way of getting the AST than decompiling byte code is all that's being asked for. Maybe not easy to do in the general case, but certainly not an unreasonable request. Cheers, Steve Top-posted from my Windows Phone ________________________________ From: Greg Ewing<mailto:greg.ew...@canterbury.ac.nz> Sent: 5/21/2015 17:29 To: python-dev@python.org<mailto:python-dev@python.org> Subject: Re: [Python-Dev] Enable access to the AST for Python code Ethan Furman wrote: > I think the key difference is that the AST is not going to be converted > to run different Python code under Python, but under some other language > -- presumably to implement the semantics of the Python snippet. If the semantics were exactly the same as the Python snippet, there would be no need to convert it to another language -- you might as well just run the Python code as-is. The whole point of this kind of facility is to express things that you *can't* express the way you would like using standard Python semantics. From the user's point of view, it doesn't matter whether the implementation works by generating Python code, or generating some other language, or processing the AST directly. The effect is to assign non-Python semantics to Python syntax. (At least is *is* still Python syntax -- I can understand Guido being wary of letting people redefine the syntax as well.) -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40microsoft.com
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com