Get the latest tech news
Adding syntax to the CPython interpreter
2024-10-17 Condensed version of this cool blog post. Let's add some new syntax to Python! Making a small change is not so hard.
Our aim is to make ternary statements default to None as they do in Ruby: Now let's run the Python interpreter we built and check it works: Now lets's change the grammar so that if we don't have an else condition we default to None.
Or read this on Hacker News