[Python-ideas] History on proposals for Macros?

Steven D'Aprano steve at pearwood.info
Thu Apr 2 03:13:59 CEST 2015


On Wed, Apr 01, 2015 at 10:00:21PM +0000, Andrew Barnert wrote:
[mass snippage deployed]

While I do have some interest in this subject, I think at the point you 
are doing detailed code reviews of experimental software, it's probably 
no longer on-topic for this mailing list and possibly should be taken 
off-list until you have something concrete to report.

Also, if you want to explore this further:

(1) Hacking the byte-code is not portable. It won't work in non-CPython 
implementations, and bytecode is not a stable part of the CPython API 
either. Hacking the AST may be better.

(2) If you must hack the bytecode, there is at least one library for 
bytecode manipulations out in there, possibly on PyPI. Google for 
"python byte-code hacking" for more.


-- 
Steve


More information about the Python-ideas mailing list