Date: Mon, 19 Oct 2020 19:00:00 -0400
<div class="wp-block-jetpack-markdown"><h3>Summary</h3> <p>The release of Python 3.9 introduced a new parser that paves the way for brand new features. Every programming language has its own specific syntax for representing the logic that you are trying to express. The way that the rules of the language are defined and validated is with a grammar definition, which in turn is processed by a parser. The parser that the Python language has relied on for the past 25 years has begun to show its age through mounting technical debt and a lack of flexibility in defining new syntax. In this episode Pablo Galindo and Lysandros Nikolaou explain how, together with Python’s creator Guido van Rossum, they replaced the original parser implementation with one that is more flexible and maintainable, why now was the time to make the change, and how it will influence the future evolution of the language.</p> <h3>Announcements</h3> <ul> <li>Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.</li> <li>When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With the launch of their managed Kubernetes platform it’s easy to get started with the next generation of deployment and scaling, powered by the battle tested Linode platform, including simple pricing, node balancers, 40Gbit networking, dedicated CPU and GPU instances, and worldwide data centers. Go to <a href="https://www.pythonpodcast.com/linode?utm_source=rss&utm_medium=rss">pythonpodcast.com/linode</a> and get a $60 credit to try out a Kubernetes cluster of your own. And don’t forget to thank them for their continued support of this show!</li> <li>You listen to this show to learn and stay up to date with the ways that Python is being used, including the latest in machine learning and data analysis. For more opportunities to stay up to date, gain new skills, and learn from your peers there are a growing number of virtual events that you can attend from the comfort and safety of your home. Go to <a href="https://www.pythonpodcast.com/conferences?utm_source=rss&utm_medium=rss">pythonpodcast.com/conferences</a> to check out the upcoming events being offered by our partners and get registered today!</li> <li>Your host as usual is Tobias Macey and today I’m interviewing Pablo Galindo and Lysandros Nikolaou about their work on replacing the parser in CPython and what that means for the language</li> </ul> <h3>Interview</h3> <ul> <li>Introductions</li> <li>How did you get introduced to Python?</li> <li>Can you start by discussing the role of the parser in the lifecycle of a Python program?</li> <li>What were the limitations of the previous parser, and how did that contribute to complexity and technical debt in the CPython runtime?</li> <li>What are the options for styles of parsers, and what are the benefits of using a PEG style grammar?</li> <li>How does the new parser impact the approachability of the CPython code for new contributors?</li> <li>What was the process for reimplementing the parser and guarding against regressions in the syntax?</li> <li>As developers switch to the 3.9 release, what potential edge cases/bugs might they see from introducing the new parser?</li> <li>What new syntax options does this parser provide for the Python language? <ul> <li>Are there any specific features that are planned for implementation in the 3.10 release that are enabled by the new parser grammar?</li> </ul> </li> <li>As the language evolves due to new capabilities offered by the updated parser, how will that impact other implementations such as PyPy?</li> <li>What were the most interesting, unexpected, or challenging aspects of this project?</li> <li>What other aspects of the CPython code do you think should be reconsidered or reimplemented in light of the changes in computing and the usage of the language?</li> </ul> <h3>Keep In Touch</h3> <ul> <li>Pablo <ul> <li><a href="https://github.com/pablogsal?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">pablogsal</a> on GitHub</li> <li><a href="https://twitter.com/pyblogsal?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">@pyblogsal</a> on Twitter</li> <li><a href="https://www.linkedin.com/in/pablo-galindo-salgado-4996b4139/?originalSubdomain=uk&utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">LinkedIn</a></li> </ul> </li> <li>Lysandros <ul> <li><a href="https://www.linkedin.com/in/lysnikolaou/?originalSubdomain=de&utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">LinkedIn</a></li> <li><a href="https://github.com/lysnikolaou?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">lysnikolaou</a> on GitHub</li> <li><a href="https://twitter.com/lysnikolaou?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">@lysnikolaou</a> on Twitter</li> </ul> </li> </ul> <h3>Picks</h3> <ul> <li>Tobias <ul> <li><a href="https://surveys.jetbrains.com/s3/c3-python-developers-survey-2020?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Annual Python Developer Survey</a></li> <li><a href="https://www.netflix.com/title/80002311?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Jessica Jones</a> TV show</li> </ul> </li> <li>Pablo <ul> <li><a href="https://www.imdb.com/title/tt9170108/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Raised By Wolves</a> TV Series</li> </ul> </li> <li>Lysandros <ul> <li><a href="https://www.imdb.com/title/tt8398600/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Afterlife</a> TV show</li> </ul> </li> </ul> <h3>Links</h3> <ul> <li><a href="https://www.python.org/dev/peps/pep-0617/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">PEP 617</a> – New PEG Parser for CPython</li> <li><a href="https://www.pythonpodcast.com/episode-95-parsing-and-parsers-with-dave-beazley-and-erik-rose/?utm_source=rss&utm_medium=rss">Podcast Episode About Parsers</a></li> <li><a href="https://en.wikipedia.org/wiki/CPython?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">CPython</a></li> <li><a href="https://www.bloomberg.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Bloomberg</a></li> <li><a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">PEG Parsers</a></li> <li><a href="https://www.seafair.io/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Seafair</a></li> <li><a href="https://en.wikipedia.org/wiki/LL_parser?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">LL(1) Parsers</a></li> <li><a href="https://lukasz.langa.pl/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Ćukasz Langa</a></li> <li><a href="https://en.wikipedia.org/wiki/Compiler-compiler?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Parser Generator</a></li> <li><a href="https://en.wikipedia.org/wiki/Parse_tree?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Concrete Syntax Tree</a></li> <li><a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Abstract Syntax Tree</a></li> <li><a href="https://www.pypy.org/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">PyPy</a></li> <li><a href="https://rustpython.github.io/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">RustPython</a> <ul> <li><a href="https://www.pythonpodcast.com/rust-python-interpreter-episode-207/?utm_source=rss&utm_medium=rss">Podcast Episode</a></li> </ul> </li> <li><a href="https://ironpython.net/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">IronPython</a></li> <li><a href="https://www.python.org/dev/peps/pep-0622/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Structural Pattern Matching – PEP 622</a></li> <li><a href="https://www.pylint.org/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Pylint</a></li> <li><a href="https://github.com/PyCQA/astroid?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">ASTroid</a> <ul> <li><a href="https://www.pythonpodcast.com/episode-35-sylvain-thenault-on-astroid/?utm_source=rss&utm_medium=rss">Podcast Episode</a></li> </ul> </li> <li><a href="https://docs.hylang.org/en/stable/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Hy</a> <ul> <li><a href="https://www.pythonpodcast.com/episode-23-hylang-core-developers/?utm_source=rss&utm_medium=rss">Podcast Episode</a></li> </ul> </li> <li><a href="https://www.python.org/dev/peps/pep-0572/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Walrus Operator/Assignment Expressions</a></li> <li><a href="https://en.wikipedia.org/wiki/C99?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">C99</a></li> <li><a href="https://en.wikipedia.org/wiki/Reference_counting?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Reference Counting</a></li> <li><a href="https://en.wikipedia.org/wiki/Tracing_garbage_collection#Generational_GC_(ephemeral_GC)?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Cycle Hunting/Generational Garbage Collection</a></li> </ul> <p>The intro and outro music is from Requiem for a Fish <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">The Freak Fandango Orchestra</a> / <a href="http://creativecommons.org/licenses/by-sa/3.0/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a></p> </div> <img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&rec=1&url=https%3A%2F%2Fwww.pythonpodcast.com%2Fcpython-parser-replacement-episode-285%2F&action_name=The+Journey+To+Replace+Python%27s+Parser+And+What+It+Means+For+The+Future+-+Episode+285&urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&utm_source=rss&utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" />