The Real Python Podcast

Using an Ellipsis in Python & Goals for CPython 3.12


Listen Later

Where should you use an ellipsis in Python? How does it behave as a placeholder in a script, project, or stub file? What are the next goals for the Faster CPython project? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We talk about a Real Python article that covers when you should use an ellipsis in Python. We discuss the similarities with the pass keyword and how it’s used for type hints within stub files.

Christopher shares resources covering the goals of the Faster CPython project. We’re on the cusp of the release of Python 3.11, but the project keeps moving forward as they look at ways to continue speeding up Python.

We share several other articles and projects from the Python community, including a news roundup, alternatives for hosting Python-based applications, ways to create custom Python strings, a discussion about aging programmers, a structural diff that understands syntax, and a project for refurbishing and modernizing Python codebases.

Course Spotlight: Providing Multiple Constructors in Your Python Classes

In this video course, you’ll learn how to provide multiple constructors in your Python classes. To this end, you’ll learn different techniques, such as checking argument types, using default argument values, writing class methods, and implementing single-dispatch methods.

Topics:

  • 00:00:00 – Introduction
  • 00:02:26 – Django security releases issued
  • 00:02:44 – PEP 698: Override Decorator for Static Typing
  • 00:03:37 – Heroku Alternatives for Python-Based Applications
  • 00:14:34 – Python 3.12 Goals: Faster-CPython Ideas Wiki
  • 00:20:29 – Sponsor: InfluxDB
  • 00:21:19 – When Do You Use an Ellipsis in Python?
  • 00:28:18 – Custom Python Strings: Inheriting From str vs UserString
  • 00:32:52 – Aging Programmer
  • 00:46:32 – Video Course Spotlight
  • 00:47:48 – difftastic: A Structural Diff That Understands Syntax
  • 00:50:44 – refurb: Refurbish and Modernize Python Codebases
  • 00:55:44 – Thanks and goodbye
  • News:

    • Django security releases issued: 4.1.2, 4.0.8, and 3.2.16 | Weblog | Django
    • PEP 698: Override Decorator for Static Typing – This Python Enhancement Proposal describes the use of a new decorator, @override, which would be used as a type hint for methods in a subclass that override a parent’s method. This type hint would introduce a level of safety if the parent method is refactored without corresponding changes to the child method.
    • Show Links:

      • Heroku Alternatives for Python-Based Applications – Learn about alternatives to Heroku and their pros and cons. Platforms discussed include Digital Ocean, Google App Engine, AWS, Azure, PythonAnywhere, and half a dozen more.
      • Python 3.12 Goals: Faster-CPython Ideas Wiki – A summary of the goals for the Faster CPython initiative within the Python 3.12 release. Includes trace optimizations, shrinking object sizes, improving memory management overhead, and more. See also the associated Workflow for 3.12 cycle checklist.
      • When Do You Use an Ellipsis in Python? – You may have seen three dots in Python scripts. Although this syntax may look odd, using an ellipsis is valid Python code. In this tutorial, you’ll learn when Python’s Ellipsis constant can come in handy for you.
      • Custom Python Strings: Inheriting From str vs UserString – In this tutorial, you’ll learn how to create custom string-like classes in Python by inheriting from the built-in str class or by subclassing UserString from the collections module.
      • Discussion:

        • Aging Programmer
        • Projects:

          • difftastic: A Structural Diff That Understands Syntax
          • refurb: Refurbish and Modernize Python Codebases
          • Additional Links:

            • Opalstack
            • cookiecutter-python · PyPI
            • typeshed/stubs at master · python/typeshed
            • Why Can’t Programmers.. Program?
            • Level up your Python skills with our expert-led courses:

              • Sneaky REST APIs With Django Ninja
              • Using Multiple Constructors in Your Python Classes
              • Using Python Class Constructors
              • 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

                136 ratings


                More shows like The Real Python Podcast

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

                Software Engineering Radio - the podcast for professional software developers

                272 Listeners

                The Changelog: Software Development, Open Source by Changelog Media

                The Changelog: Software Development, Open Source

                283 Listeners

                Thoughtworks Technology Podcast by Thoughtworks

                Thoughtworks Technology Podcast

                41 Listeners

                Talk Python To Me by Michael Kennedy

                Talk Python To Me

                592 Listeners

                Software Engineering Daily by Software Engineering Daily

                Software Engineering Daily

                625 Listeners

                Soft Skills Engineering by Jamison Dance and Dave Smith

                Soft Skills Engineering

                269 Listeners

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

                Super Data Science: ML & AI Podcast with Jon Krohn

                296 Listeners

                Python Bytes by Michael Kennedy and Brian Okken

                Python Bytes

                213 Listeners

                Data Engineering Podcast by Tobias Macey

                Data Engineering Podcast

                142 Listeners

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

                Syntax - Tasty Web Development Treats

                983 Listeners

                DataFramed by DataCamp

                DataFramed

                266 Listeners

                Kubernetes Podcast from Google by Abdel Sghiouar, Kaslin Fields

                Kubernetes Podcast from Google

                181 Listeners

                Practical AI by Practical AI LLC

                Practical AI

                189 Listeners

                The Stack Overflow Podcast by The Stack Overflow Podcast

                The Stack Overflow Podcast

                64 Listeners

                The Pragmatic Engineer by Gergely Orosz

                The Pragmatic Engineer

                52 Listeners