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

              134 ratings


              More shows like The Real Python Podcast

              View all
              Hanselminutes with Scott Hanselman by Scott Hanselman

              Hanselminutes with Scott Hanselman

              377 Listeners

              Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

              Software Engineering Radio - the podcast for professional software developers

              265 Listeners

              The Changelog: Software Development, Open Source by Changelog Media

              The Changelog: Software Development, Open Source

              287 Listeners

              LINUX Unplugged by Jupiter Broadcasting

              LINUX Unplugged

              262 Listeners

              Thoughtworks Technology Podcast by Thoughtworks

              Thoughtworks Technology Podcast

              41 Listeners

              Talk Python To Me by Michael Kennedy

              Talk Python To Me

              585 Listeners

              Software Engineering Daily by Software Engineering Daily

              Software Engineering Daily

              628 Listeners

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

              Super Data Science: ML & AI Podcast with Jon Krohn

              295 Listeners

              Python Bytes by Michael Kennedy and Brian Okken

              Python Bytes

              213 Listeners

              Data Engineering Podcast by Tobias Macey

              Data Engineering Podcast

              140 Listeners

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

              Syntax - Tasty Web Development Treats

              987 Listeners

              CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

              CoRecursive: Coding Stories

              186 Listeners

              DataFramed by DataCamp

              DataFramed

              269 Listeners

              Practical AI by Practical AI LLC

              Practical AI

              190 Listeners

              The Stack Overflow Podcast by The Stack Overflow Podcast

              The Stack Overflow Podcast

              63 Listeners