Building a Python JSON Parser & Discussing Ideas for PEPs
Dec 1, 2023
Python language enhancement ideas discussed including simplifying keyword arguments syntax and returning named tuples from functions. Tutorial on building a JSON-like parser in Python. Other topics include upcoming episodes, PyPI security audit, mentoring work impact, Django admin interface, Git terminology confusion, Python Advent of Code video course, using named tuples as function returns, projects 'grab links' and 'Reg X Crossword'
56:31
forum Ask episode
web_stories AI Snips
view_agenda Chapters
auto_awesome Transcript
info_circle Episode notes
insights INSIGHT
Episode Overview And Themes
The episode frames how community proposals and tutorials shape Python practice and learning.
It connects language ideas, parsing tutorials, and community resources into practical entry points.
volunteer_activism ADVICE
Treat Security Audits as Priority
PyPI completed a security audit with no high severity advisories found and low issues fixed promptly.
Use official audits and sponsorship to improve project security and trust.
insights INSIGHT
Typing Adoption Is Increasing
Newer Python core developers use typing far more than older members, showing a shift in community practices.
Typing adoption rose to about 76% among devs who joined in the last three years versus ~39% overall.
Get the Snipd Podcast app to discover more snips from this episode
Have you thought of a way to improve the Python language? How do you share your idea with core developers and start a discussion in the Python community? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We consider a couple of Python syntax and functional ideas posted to the discussions on python.org. The first idea is for simplifying the syntax of a function’s keyword arguments, and the second is for the ability to return a NamedTuple from a function. The threads reveal steps within the Python Enhancement Proposal (PEP) process and the goal of finding a sponsor.
Christopher covers a tutorial on building a JSON-like parser in Python. The project is a solid place to start if you want to learn about parsing and developing rules for recognizing syntax and extracting data.
We also share several other articles and projects from the Python community, including a couple of release announcements and news items, a step-by-step guide to building a hangman game for the command line in Python, the reasons why the Django admin is supposedly ugly and ways to customize it to differentiate admin environments, an explanation of confusing git terminology, a project to extract links from a remote HTML resource, and a regex crossword game.
Advent of Code is an online advent calendar that shares new programming puzzles each day from December 1 to the 25. In this Code Conversation, you’ll learn why solving programming puzzles can be beneficial and how you can get started with Advent of Code using Python.
Topics:
00:00:00 – Introduction
00:02:46 – PyPI has completed its first security audit
00:03:55 – Python Developers Survey 2023
00:04:45 – Wagtail 5.2 (LTS) Released
00:05:02 – How many Python core devs use typing?
00:07:51 – Build a Hangman Game for the Command Line in Python
00:17:30 – Why Is the Django Admin “Ugly”?
00:20:37 – Customize the Django Admin to Differentiate Environments
00:22:48 – Confusing git Terminology
00:30:01 – Video Course Spotlight
00:31:31 – Let’s Make a Silly JSON-like Parser
00:34:31 – Idea: Return a NamedTuple
00:45:08 – Idea: Syntactic Sugar to Encourage Use of Named Arguments
00:50:31 – grablinks: Extract Links From a Remote HTML Resource
Build a Hangman Game for the Command Line in Python – In this step-by-step project, you’ll learn how to write the game of hangman in Python for the command line. You’ll learn how to structure the game as a text-based interface (TUI) application.
Why Is the Django Admin “Ugly”? – When Vince was talking with people at DjangoCon US, one question kept coming up: Why is the Django admin so “ugly”?
Customize the Django Admin to Differentiate Environments – A quick post about changing the color scheme of the Django admin depending on what environment the code is deployed within. Although Django specific, this is a great idea—visually reminding your admins and developers whether they’re in dev, staging, or production.
Confusing git Terminology – Julia is working on a doc that explains git and, in doing so, polled some people about what git terminology they found confusing. This post covers the most common responses and attempts to clear up the confusion.
Let’s Make a Silly JSON-like Parser – This article goes into deep detail on how you would construct a JSON parser in Python. If you’re new to parsing, then this is a great place to start.