The Real Python Podcast

Good Python Programming Practices When New to the Language


Listen Later

What advice would you give to someone moving from another language to Python? What good programming practices are inherent to the language? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss an older forum post from a new Python user who came from Perl. We suggest checking out PEP 8, or as it’s commonly known, “The Style Guide for Python Code.” We provide advice about installing Python, avoiding common pitfalls, learning how scope is managed, and taking advantage of a collection of Real Python resources.

We share several other articles and projects from the Python community, including a new Python release, practical NumPy examples and exercises, considering targets of for loops, exploring Python dependency management, checking package compatibility with free-threading and subinterpreters, an experimental filesystem navigator in Textual, and a background workers reference implementation in Django.

This episode is sponsored by AssemblyAI.

Course Spotlight: Writing Beautiful Pythonic Code With PEP 8

Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators. This course outlines the key guidelines laid out in PEP 8. It’s aimed at beginner to intermediate programmers.

Topics:

  • 00:00:00 – Introduction
  • 00:02:17 – Python 3.14.0 Alpha 2 Released
  • 00:02:35 – Take the 2024 Django Developers Survey
  • 00:03:17 – NumPy Practical Examples: Useful Techniques
  • 00:07:09 – Loop Targets
  • 00:09:19 – Python Dependency Management Is a Dumpster Fire
  • 00:23:15 – Sponsor: AssemblyAI
  • 00:24:00 – Package Compatibility With Free-Threading and Subinterpreters
  • 00:27:02 – Suggestions for good programming practices?
  • 00:37:59 – Video Course Spotlight
  • 00:39:24 – terminal-tree: Experimental Filesystem Navigator in Textual
  • 00:43:56 – django-tasks: Background Workers Reference Implementation
  • 00:49:44 – Thanks and goodbye
  • News:

    • Python 3.14.0 Alpha 2 Released
    • Take the 2024 Django Developers Survey
    • Topics:

      • NumPy Practical Examples: Useful Techniques – In this tutorial, you’ll learn how to use NumPy by exploring several interesting examples. You’ll read data from a file into an array and analyze structured arrays to perform a reconciliation. You’ll also learn how to quickly chart an analysis and turn a custom function into a vectorized function.
      • Loop Targets – Loop assignment allows you to assign to a dict item in a for loop. This post covers what that means and that it is no more costly than regular assignment.
      • Python Dependency Management Is a Dumpster Fire – Managing dependencies in Python can be a bit of a challenge. This deep dive article shows you all the problems and how the problems are mitigated if not solved.
      • Package Compatibility With Free-Threading and Subinterpreters – This tracker tests the compatibility of the 500 most popular packages with Python 3.13’s free-threading and subinterpreter features.
      • Discussion:

        • Suggestions for good programming practices?
        • Python Best Practices – Real Python
        • PEP 8 – Style Guide for Python Code
        • Projects:

          • terminal-tree: Experimental Filesystem Navigator in Textual
          • django-tasks: Background Workers Reference Implementation
          • Additional Links:

            • Episode #146: Using NumPy and Linear Algebra for Faster Python Code – The Real Python Podcast
            • How to Write Beautiful Python Code With PEP 8 – Real Python
            • Writing Idiomatic Python – Real Python
            • Namespaces and Scope in Python – Real Python
            • How to Install Python on Your System: A Guide – Real Python
            • Python Virtual Environments: A Primer – Real Python
            • Sourcery - Instant Code Review for Faster Velocity
            • Episode #183: Exploring Code Reviews in Python and Automating the Process
            • Textual
            • uv - An extremely fast Python package and project manager, written in Rust.
            • DEP 0014: Background workers - GitHub
            • PyCoder’s Weekly - Have a Project You Want to Share? - Submit a Link
            • Level up your Python skills with our expert-led courses:

              • Navigating Namespaces and Scope in Python
              • Writing Idiomatic Python
              • Writing Beautiful Pythonic Code With PEP 8
              • 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

                Data Skeptic by Kyle Polich

                Data Skeptic

                481 Listeners

                Talk Python To Me by Michael Kennedy

                Talk Python To Me

                592 Listeners

                Software Engineering Daily by Software Engineering Daily

                Software Engineering Daily

                624 Listeners

                The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence) by Sam Charrington

                The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence)

                443 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

                982 Listeners

                CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

                CoRecursive: Coding Stories

                189 Listeners

                DataFramed by DataCamp

                DataFramed

                266 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

                Latent Space: The AI Engineer Podcast by swyx + Alessio

                Latent Space: The AI Engineer Podcast

                77 Listeners