Skip to main content
EuroPythonCode of ConductLive šŸ“¹

Norvig's lispy: beautiful and illuminating Python code

Room:
Wicklow Hall 1
Start (Dublin time):
Start (your time):
Duration:
180 minutes

Abstract

Why isn't if a function? Why does Python need to add keywords from time to time? What precisely is a closure, what problem does it solve, and how does it work? These are some of the fundamental questions you'll be able to answer after this tutorial: an interactive exploration of Peter Norvig's lis.pyā€“an interpreter for a subset of the Scheme dialect of Lisp in 132 lines of Python.

TutorialPython Friends

Description

Peter Norvig of Stanford University wrote lis.py: an interpreter for a subset of the Scheme dialect of Lisp in 132 lines of readable Python. I took Norvig's code, updated it to modern Python coding style, and integrated it into a Jupyter notebook that provides explanations as well as interactive experiments and exercises checked automatically.

Why should you study lis.py? This is what I got out of it:

  • Learning how an interpreter works gave me a deeper understanding of Python and programming languages in generalā€”interpreted or compiled.

  • The simplicity of Scheme is a master class of language design.

  • lis.py is a beautiful example of idiomatic Python code.


The speaker

Luciano Ramalho

Luciano Ramalho is the author of Fluent Python, published in 9 languages. He is a Principal Consultant at Thoughtworks and a Fellow of the Python Software Foundation.



ā† Back to schedule