The Real Python Podcast

Exploring Python With bpython & Formalizing f-String Grammar


Listen Later

Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss the drop-in REPL replacement bpython. bpython enhances the interactivity of a Python REPL session. It’s also a powerful teaching tool for instructors and students to experiment with and explore Python code.

Christopher shares a recent Python Enhancement Proposal (PEP) about formalizing the grammar for f-strings. The PEP describes a reduction in the underlying parser code complexity and provides for future features like comments in multiline f-strings.

We share several other articles and projects from the Python community, including a news roundup, a collection of surveys to classify Python virtual environment workflows, a course about context managers and Python’s with statement, a discussion about microfeatures that we would like to see adopted in Python, a Python terminal music player, and an infinite array powered by AI.

Course Spotlight: Context Managers and Python’s with Statement

In this video course, you’ll learn what the Python with statement is and how to use it with existing context managers. You’ll also learn how to create your own context managers.

Topics:

  • 00:00:00 – Introduction
  • 00:02:21 – Pillow 9.4.0 Released
  • 00:02:47 – Django Bugfix Release: 4.1.5
  • 00:02:56 – Plone 6.0 Released
  • 00:03:16 – PyCon Italia 2023
  • 00:03:54 – Discover bpython: A Python REPL With IDE-Like Features
  • 00:13:55 – PEP 701: Syntactic Formalization of f-Strings
  • 00:17:07 – Sponsor: Influx Data
  • 00:17:57 – Classifying Python Virtual Environment Workflows
  • 00:30:26 – Context Managers and Python’s with Statement
  • 00:36:32 – Video Course Spotlight
  • 00:37:47 – Microfeatures I’d Like to See in More Languages
  • 00:49:34 – Python Terminal Music Player
  • 00:51:19 – Infinite AI Array
  • 00:55:05 – Thanks and goodbye
  • News:

    • Pillow 9.4.0 Released
    • Django Bugfix Release: 4.1.5
    • Plone 6.0 Released
    • PyCon Italia 2023
    • Show Links:

      • Discover bpython: A Python REPL With IDE-Like Features – In this tutorial, you’ll learn about bpython, an alternative Python REPL that brings code suggestions and many other IDE-like features to the terminal. Once you discover how much bpython can improve your productivity, you’ll never want to return to using the vanilla Python REPL again.
      • PEP 701: Syntactic Formalization of f-Strings – This Python Enhancement Proposal describes the formalization of a grammar for f-strings, allowing a reduction in the underlying parser code complexity and providing future features like comments in multiline f-strings.
      • Classifying Python Virtual Environment Workflows – This article discusses the various ways of creating and managing Python virtual environments, including what kinds of tools you could use. It categorizes the different styles and describes how the choices that you make affect your workflow.
      • Context Managers and Python’s with Statement – In this video course, you’ll learn what the Python with statement is and how to use it with existing context managers. You’ll also learn how to create your own context managers.
      • Microfeatures I’d Like to See in More Languages – Some language features are intrinsic to the language. Others are syntactic sugar that other programming languages could easily borrow. This opinion piece from Hillel highlights some features that the mainstream should steal from more obscure languages. Two Python features that he’d like to see in more languages are chained evaluations (2 <= x < 10) and numbers with separators (1000000 == 1_000_000).
      • Projects:

        • Python Terminal Music Player
        • Infinite AI Array – Learn about an insane library containing special lists and dicts so that any missed calls automatically go to GPT3 and add a predictive value in its place.
        • Additional Links:

          • Christopher Trudeau’s - Act function for virtual environments
          • Level up your Python skills with our expert-led courses:

            • Working With Python Virtual Environments
            • Python 3's F-Strings: An Improved String Formatting Syntax
            • Context Managers and Using Python's with Statement
            • Support the podcast & join our community of Pythonistas

              ...more
              View all episodesView all episodes
              Download on the App Store

              The Real Python PodcastBy Real Python

              • 4.7
              • 4.7
              • 4.7
              • 4.7
              • 4.7

              4.7

              139 ratings


              More shows like The Real Python Podcast

              View all
              The Changelog: Software Development, Open Source by Changelog Media

              The Changelog: Software Development, Open Source

              289 Listeners

              Software Engineering Daily by Software Engineering Daily

              Software Engineering Daily

              625 Listeners

              Talk Python To Me by Michael Kennedy

              Talk Python To Me

              585 Listeners

              Soft Skills Engineering by Jamison Dance and Dave Smith

              Soft Skills Engineering

              289 Listeners

              Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

              Super Data Science: ML & AI Podcast with Jon Krohn

              302 Listeners

              Python Bytes by Michael Kennedy and Brian Okken

              Python Bytes

              214 Listeners

              Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

              Syntax - Tasty Web Development Treats

              988 Listeners

              Darknet Diaries by Jack Rhysider

              Darknet Diaries

              8,039 Listeners

              Tech Brew Ride Home by Morning Brew

              Tech Brew Ride Home

              961 Listeners

              Practical AI by Practical AI LLC

              Practical AI

              211 Listeners

              AWS Podcast by Amazon Web Services

              AWS Podcast

              203 Listeners

              Django Chat by William Vincent and Carlton Gibson

              Django Chat

              75 Listeners

              Last Week in AI by Skynet Today

              Last Week in AI

              306 Listeners

              Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

              Machine Learning Street Talk (MLST)

              95 Listeners

              The Pragmatic Engineer by Gergely Orosz

              The Pragmatic Engineer

              64 Listeners