Sveriges mest populära poddar

The Real Python Podcast

Building a Python JSON Parser & Discussing Ideas for PEPs

57 min • 1 december 2023

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.

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
  • 00:52:43 – Regex Crossword
  • 00:55:46 – Thanks and goodbye

News:

Show Links:

  • 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.

Discussion:

Projects:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

Kategorier
Förekommer på
00:00 -00:00