Skip to content Skip to sidebar Skip to footer
Showing posts with the label Bytecode

Creating A New Language Within The Python Virtual Machine

Is it possible to create a new language for the Python Virtual Machine? I was reading over http://l… Read more Creating A New Language Within The Python Virtual Machine

Python: Load_fast Vs. Load_deref With Inplace Addition

Last Friday I went to a job interview and had to answer the following question: why does this code … Read more Python: Load_fast Vs. Load_deref With Inplace Addition

Generate .pyc From Python Ast?

How would I generate a .pyc file from a Python AST such that I could import the file from Python? I… Read more Generate .pyc From Python Ast?

Is It Possible To Call A Function From Within A List Comprehension Without The Overhead Of Calling The Function?

In this trivial example, I want to factor out the i Solution 1: Consolidating all of the excellent… Read more Is It Possible To Call A Function From Within A List Comprehension Without The Overhead Of Calling The Function?

In C Python, Accessing The Bytecode Evaluation Stack

Given a C Python frame pointer, how do I look at arbitrary evaluation stack entries? (Some specific… Read more In C Python, Accessing The Bytecode Evaluation Stack