Talk Abstract

If you use Python, chances are you’ve heard of PEP 8, the Python style guide.

But do you know what PEPs really are? PEPs are more than just a style guide. A PEP stands for Python Enhancement Proposal. It’s a proposal documentation for when you want to change the Python programming language in a big way, for example when you want to change the syntax of Python. Think of the addition of f-strings, the walrus operator, or the ExceptionGroup, those changes all started with a PEP.

Let’s have a PEP talk, where you can learn about the PEP process, what needs a PEP and what doesn’t, and how you as community members can take part.

Contact me (links below) if you’d like to hear this talk at your event.

Presented At

  • North Bay Python 2023
  • PyGotham 2023

Videos

North Bay Python 2023

Slide Deck

Intended Audience

This is aimed for newcomers and beginners of Python, who may have only heard of PEP 8 and not so much of other PEPs. I will cover what PEPs really are, the purpose, examples of PEPs, and how community member can participate if they want to.

Talk Outline

What’s a PEP

(< 5 minutes)

  • You know of PEP 8
  • But there are other PEPs
  • A PEP is a proposal: it’s a documentation for changes to Python

What kind of Changes Need a PEP?

(5 minutes)

  • If you want to add new syntax
  • Example: f-strings, ExceptionGroup, the “walrus” operator

Other things that have a PEP

(5 minutes)

  • Release schedule
  • Governance
  • Informational (Style Guide)

PEP lifecycle

(10 minutes)

  • How it works: start with discussing it in a public forum (like Discourse or the Python Language Summit)
  • If there is consensus and agreement of the idea, then a PEP will need to be written
  • Steering Council review and approve (or reject) the PEP
  • Once approved, the feature can go to the next Python release
  • After the feature has been done: PEP becomes final.
  • But PEP is not a documentation: you should read the Python docs after PEP has become final
  • All of these can take months, even years

Your role

(5 minutes)

  • If you don’t agree with a proposal (if it cause you hardship in the way you use Python), the best way to voice your concern is during PEP discussion period, before the SC approval, and before the release of Python.
  • Sometimes new feature cause breakage, do test your codebase against the Python main branch, or alpha versions.
  • Keep up to date by following the Discourse forum, or the PEPs repo