GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pkolchanov/CustomizingPython: Learn CPython internals by customizing the interpreter.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
pipe.md
pipe.md
 
 
tail.md
tail.md
 
 

Repository files navigation

Customizing Python

A series of step-by-step tutorials of CPython customizing. Each focuses on understanding CPython internals, and highlights different parts of the interpreter.

Pipe operator

We will add an |> operator to the CPython interpreter to perform bash-like chain calls.

>>> [1, 2] |> map(lambda x: x * 2) |> list()

[2, 4]

The tutorial covers python grammar, parsing and compilation to bytecode.

Read the tutorial

Tail call optimization

The goal is to implement tail-call optimization in the python interpreter.

>>> def u(i):
        if i == 0:
            return 'a'
        return u(i - 1)

>>> u(10000)
'a'

The tutorial covers creation a of new bytecode, flowgraph optimization, and evaluation of Python programs.

Read the tutorial


Pavel Kolchanov, 2024

About

Learn CPython internals by customizing the interpreter.

Topics

cpythoncpython-internalstutorials

Resources

Readme
Activity

Stars

18 stars

Watchers

3 watching

Forks

0 forks
Report repository

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.