CPython Bytecode Assembler

Hello, Currently it is hard to assemble cpython bytecode without help of 3rd party libraries (like: vstinner/bytecode). I'm proposing an assembler to standard library and an API to cpython's peephole optimizer. Also an interface like `ast.NodeVisitor` and `ast.NodeTransformer` for bytecode objects will may be handy. It would help if you are doing; - Runtime patching - Specific optimizations at bytecode level

It is intentionally not included -- bytecode is a detail of the implementation and changes with each feature release, without concern for backwards compatibility. On Wed, Apr 24, 2019 at 10:33 AM Batuhan Osman Taşkaya < batuhanosmantaskaya@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido) *Pronouns: he/him/his **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...>

Since bytecode is a CPython-specific implementaiton detail I don't know if it makes sense to enshrine an assembler for it in the stdlib (if you were to ask me today if I thought the dis module belonged in the stdlib I would probably say "no", but I also know not everyone agrees with that view :) . On Wed, Apr 24, 2019 at 10:36 AM Batuhan Osman Taşkaya < batuhanosmantaskaya@gmail.com> wrote:

It is intentionally not included -- bytecode is a detail of the implementation and changes with each feature release, without concern for backwards compatibility. On Wed, Apr 24, 2019 at 10:33 AM Batuhan Osman Taşkaya < batuhanosmantaskaya@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido) *Pronouns: he/him/his **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...>

Since bytecode is a CPython-specific implementaiton detail I don't know if it makes sense to enshrine an assembler for it in the stdlib (if you were to ask me today if I thought the dis module belonged in the stdlib I would probably say "no", but I also know not everyone agrees with that view :) . On Wed, Apr 24, 2019 at 10:36 AM Batuhan Osman Taşkaya < batuhanosmantaskaya@gmail.com> wrote:
participants (4)
-
Batuhan Osman Taşkaya
-
Brett Cannon
-
Guido van Rossum
-
MRAB