[Python-Dev] Dropping decorator syntax for 2.4?
theller at python.net
Fri Jun 4 05:59:46 EDT 2004
Couldn't Guido's syntax be implemented as a combination of an import
hook together with a byte code hack, without direct support in the core?
Code like this
seems to be compiled into these byte codes
10 LOAD_CONST 0 (<code object test at 0091FD20, ...)
13 MAKE_FUNCTION 0
16 STORE_NAME 2 (test)
It seems BUILD_LIST / POP_TOP / LOAD_CONST / MAKE_FUNCTION is the
sequence which should trigger the magic.
More information about the Python-Dev