On 21 May 2015 at 12:31, Guido van Rossum <guido at python.org> wrote: > Hey Ben, this is probably a better topic for python-ideas. I'll warn you > that a hurdle for ideas like this is that ideally you don't want to support > this just for CPython. It's definitely cool though! (Using movie poster > style quotes you can turn this into a ringing endorsement: "definitely cool" > -- The BDFL. :-) Agreed this is python-ideas territory, but yes there's definitely interest in being able to mark a section of code as being compiled to an AST object at compile time, and then further processed at runtime (essentially having syntax to switch on PyCF_ONLY_AST for a subexpression and/or entire statement). At the moment, you can do this all through the ast module and the PyCF_ONLY_AST flag to compile(), but you need to pass the code to be compiled around as strings, which tends to somewhat user (and IDE!) unfriendly. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4