I just had the pleasure of giving a talk at this year’s PyCon UK in Cardiff on the issue of syntax errors and error messages in Python. The talk is based on my research on syntax errors, student misconceptions, and error messages in Python, where I try to give a brief overview of my work. … Continue reading PyCon UK 2019
Author: Tobias Kohn
Dennis Komm and I have been invited to give a workshop in the education track at this year’s PyCon SK in Bratislava, Slovakia. Unfortunately, our overall workload left little room to attend many of the other sessions (not speaking Slovakian was certainly a further impediment), but the little we saw was interesting and impressive enough. … Continue reading PyCon SK 2019
Each month the high school KZO publishes an official letter. In November 2018, I was given the opportunity to write about my first impressions of Cambridge. The text is available in German only. Noch ehe sich die Sonne zur Ruhe gesetzt hat, hat sich der Juli-Mond bereits ans Firmament geschlichten. Noch ist er zurückhaltend und … Continue reading Monatsbrief November
A copy of this article is available on GitHub: it might turn out to be better readable with GitHub’s formatting. Introduction As part of a recent project, I needed to analyse the abstract syntax tree (AST) of Python programs. To illustrate the task, let us consider a piece of a code that is supposed to … Continue reading On the Syntax of Pattern Matching in Python
Introduction and Motivation If you want to analyse, or even optimise Python code, you probably want to do that on the basis of the Abstract Syntax Tree (AST). The AST is, as the name suggests, an abstract representation of the code in the form of a tree structure (see also my article on Implementing Code … Continue reading Implementing Pattern Matching in Python
The team behind TigerJython has been awarded this year’s STEM Prize of ETH for individuals. The prize is given annually by ETH Rector Sarah Springman, awarding special contributions to STEM education by institions, and individuals. We are, of course, very happy about this recognition of our work, and I would like to thank ETH for … Continue reading TigerJython Team Awarded ETH’s STEM Prize
For the ninth time, Prof. Juraj Hromkovic, and his team at ETH/ABZ have organised the Swiss Day of Computer Science Education (STIU – “Schweizerischer Tag für Informatik Unterricht”), which took place at ETH in Zurich. Each year, the STIU workshop offers several workshops on various topics of Computer Science Education in K-12, attracting many teachers … Continue reading Swiss Workshop for Computer Science Education (STIU)
The Idea of Tail Call Optimisation There is a famous family of numerical sequences, which can be built according to a very simple pattern. You start with an arbitrary positive integer as your first number in the sequence. Whenever your number is even, you divide it by two. Otherwise, you multiply it be three, and … Continue reading Why Optimising Python is Hard (3): Tail Call Optimisation
You can easily nest functions in Python. That is, you define a function inside another function. This leads to a significant challenge, though: how can a nested function access variables of the surrounding function, when the surrounding function might already have died? Somehow, a function needs to capture all necessary variables it needs to properly … Continue reading Closures in Python
We are on a quest to optimise Python programs. More specifically, we want to replace instances where builtin functions are called with known arguments, such as len(‘abc’), by the respective result (which would be 3 in this case). In order to succeed, we must make sure that the name len really refers to the built-in … Continue reading Why Optimising Python is Hard (2): Messing with Namespaces