Podbean logo
  • Discover
  • Podcast Features
    • Podcast Hosting

      Start your podcast with all the features you need.

    • Podbean AI Podbean AI

      AI-Enhanced Audio Quality and Content Generation.

    • Blog to Podcast

      Repurpose your blog into an engaging podcast.

    • Video to Podcast

      Convert YouTube playlists to podcasts, videos to audios.

  • Monetization
    • Ads Marketplace

      Join Ads Marketplace to earn through podcast sponsorships.

    • PodAds

      Manage your ads with dynamic ad insertion capability.

    • Apple Podcasts Subscriptions Integration

      Monetize with Apple Podcasts Subscriptions via Podbean.

    • Live Streaming

      Earn rewards and recurring income from Fan Club membership.

  • Podbean App
    • Podcast Studio

      Easy-to-use audio recorder app.

    • Podcast App

      The best podcast player & podcast app.

  • Help and Support
    • Help Center

      Get the answers and support you need.

    • Podbean Academy

      Resources and guides to launch, grow, and monetize podcast.

    • Podbean Blog

      Stay updated with the latest podcasting tips and trends.

    • What’s New

      Check out our newest and recently released features!

    • Podcasting Smarter

      Podcast interviews, best practices, and helpful tips.

  • Popular Topics
    • How to Start a Podcast

      The step-by-step guide to start your own podcast.

    • How to Start a Live Podcast

      Create the best live podcast and engage your audience.

    • How to Monetize a Podcast

      Tips on making the decision to monetize your podcast.

    • How to Promote Your Podcast

      The best ways to get more eyes and ears on your podcast.

    • Podcast Advertising 101

      Everything you need to know about podcast advertising.

    • Mobile Podcast Recording Guide

      The ultimate guide to recording a podcast on your phone.

    • How to Use Group Recording

      Steps to set up and use group recording in the Podbean app.

  • All Arts Business Comedy Education
  • Fiction Government Health & Fitness History Kids & Family
  • Leisure Music News Religion & Spirituality Science
  • Society & Culture Sports Technology True Crime TV & Film
  • Live
  • How to Start a Podcast
  • How to Start a Live Podcast
  • How to Monetize a podcast
  • How to Promote Your Podcast
  • How to Use Group Recording
  • Log in
  • Start your podcast for free
  • Podcasting
    • Podcast Features
      • Podcast Hosting

        Start your podcast with all the features you need.

      • Podbean AI Podbean AI

        AI-Enhanced Audio Quality and Content Generation.

      • Blog to Podcast

        Repurpose your blog into an engaging podcast.

      • Video to Podcast

        Convert YouTube playlists to podcasts, videos to audios.

    • Monetization
      • Ads Marketplace

        Join Ads Marketplace to earn through podcast sponsorships.

      • PodAds

        Manage your ads with dynamic ad insertion capability.

      • Apple Podcasts Subscriptions Integration

        Monetize with Apple Podcasts Subscriptions via Podbean.

      • Live Streaming

        Earn rewards and recurring income from Fan Club membership.

    • Podbean App
      • Podcast Studio

        Easy-to-use audio recorder app.

      • Podcast App

        The best podcast player & podcast app.

  • Advertisers
  • Enterprise
  • Pricing
  • Resources
    • Help and Support
      • Help Center

        Get the answers and support you need.

      • Podbean Academy

        Resources and guides to launch, grow, and monetize podcast.

      • Podbean Blog

        Stay updated with the latest podcasting tips and trends.

      • What’s New

        Check out our newest and recently released features!

      • Podcasting Smarter

        Podcast interviews, best practices, and helpful tips.

    • Popular Topics
      • How to Start a Podcast

        The step-by-step guide to start your own podcast.

      • How to Start a Live Podcast

        Create the best live podcast and engage your audience.

      • How to Monetize a Podcast

        Tips on making the decision to monetize your podcast.

      • How to Promote Your Podcast

        The best ways to get more eyes and ears on your podcast.

      • Podcast Advertising 101

        Everything you need to know about podcast advertising.

      • Mobile Podcast Recording Guide

        The ultimate guide to recording a podcast on your phone.

      • How to Use Group Recording

        Steps to set up and use group recording in the Podbean app.

  • Discover
  • Log in
    Sign up free
The Real Python Podcast

The Real Python Podcast

Technology

Exploring Duck Typing in Python & Dynamics of Monkey Patching

Exploring Duck Typing in Python & Dynamics of Monkey Patching

2024-03-15
Download Right click and do "save link as"

What are the advantages of determining the type of an object by how it behaves? What coding circumstances are not a good fit for duck typing? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher covers a recent Real Python tutorial by Leodanis Pozo Ramos titled Duck Typing in Python: Writing Flexible and Decoupled Code. The tutorial explains the concepts of duck typing within object-oriented programming and its use within Python’s built-in tools.

We discuss a recent article on monkey patching in Python. This practice of dynamically modifying a class or module’s behavior at runtime allows for testing, debugging, and experimentation.

We also share several other articles and projects from the Python community, including a news roundup, why names are not the same as objects in Python, using IPython Jupyter magic commands, a discussion about becoming a senior developer, a data exploration challenge, a Python evaluation game, and a terminal UI for regex testing.

This week’s episode is brought to you by Sentry.

Course Spotlight: Pointers and Objects in Python

In this video course, you’ll learn about Python’s object model and see why pointers don’t really exist in Python. You’ll also cover ways to simulate pointers in Python without managing memory.

Topics:

  • 00:00:00 – Introduction
  • 00:02:38 – Listener feedback
  • 00:04:02 – DjangoCon US Call for Proposals
  • 00:04:38 – White House Recommends Use of Python
  • 00:05:41 – JupyterLab 4.1 and Notebook 7.1 Released
  • 00:06:05 – What’s in a Name?
  • 00:11:52 – Duck Typing in Python: Writing Flexible and Decoupled Code
  • 00:15:07 – Sponsor: Sentry
  • 00:16:11 – Using IPython Jupyter Magic Commands
  • 00:22:31 – A Guide to Monkey Patching
  • 00:25:27 – Falsehoods Junior Developers Believe About Becoming Senior
  • 00:33:01 – Video Course Spotlight
  • 00:34:11 – Falsehoods continued
  • 00:43:43 – Where in the data?
  • 00:46:55 – the eval game
  • 00:48:03 – rexi: Terminal UI for Regex Testing
  • 00:49:43 – Thanks and goodbye

News:

  • DjangoCon US Call for Proposals
  • White House Recommends Use of Python
  • JupyterLab 4.1 and Notebook 7.1 Released

Show Links:

  • What’s in a Name? – An article about names in Python, and why they’re not the same as objects. The article discusses reference counts and namespaces.
  • Duck Typing in Python: Writing Flexible and Decoupled Code – In this tutorial, you’ll learn about duck typing in Python. It’s a typing system based on objects’ behaviors rather than on inheritance. By taking advantage of duck typing, you can create flexible and decoupled sets of Python classes that you can use together or individually.
  • Using IPython Jupyter Magic Commands – “IPython Jupyter Magic commands (e.g. lines in notebook cells starting with % or %%) can decorate a notebook cell, or line, to modify its behavior.” This article shows you how to define them and where they can be useful.
  • Monkeying Around With Python: A Guide to Monkey Patching – Monkey patching is the practice of modifying live code. This article shows you how it’s done and why and when to use the practice.

Discussion:

  • Falsehoods Junior Developers Believe About Becoming Senior – This opinion piece by Vadim discusses how newer developers perceive what it means to be a senior developer, and how they’re often wrong.

Projects:

  • Where in the data?
  • the eval game
  • rexi: Terminal UI for Regex Testing

Additional Links:

  • Pointers in Python: What’s the Point? – Real Python
  • Unlock IPython’s Magical Toolbox for Your Coding Journey – Real Python
  • Episode #88: Discussing Type Hints, Protocols, and Ducks in Python – The Real Python Podcast
  • saul.pw
  • BlueBird Shell

Level up your Python skills with our expert-led courses:

  • Python Type Checking
  • Testing Your Code With pytest
  • Pointers and Objects in Python

Support the podcast & join our community of Pythonistas

view more

More Episodes

Solving Problems and Saving Time in Chemistry With Python
2025-07-04
Structuring Python Scripts & Exciting Non-LLM Software Trends
2025-06-27
Scaling Python Web Applications With Kubernetes and Karpenter
2025-06-20
Starting With marimo Notebooks & Python App Config Management
2025-06-13
Rodrigo Girão Serrão: Python Training, itertools, and Idioms
2025-06-06
Python Thread Safety & Managing Projects With uv
2025-05-30
DjangoCon Europe 2025: Live Recording From Dublin
2025-05-23
Going Beyond requirements.txt With pylock.toml and PEP 751
2025-05-16
Experiments With Gen AI, Knowledge Graphs, Workflows, and Python
2025-05-09
Exploring DuckDB & Comparing Python Expressions vs Statements
2025-04-18
Learning Intermediate Python With a Deep Dive Course
2025-04-11
GUIs & TUIs: Choosing a User Interface for Your Python Project
2025-04-04
A Decade of Automating the Boring Stuff With Python
2025-03-21
Manage Projects With pyproject.toml & Explore Polars LazyFrames
2025-03-14
Eric Matthes: Maybe Don't Start With Unit Tests
2025-03-07
Deciphering Python Jargon & Compiling Python 1.0
2025-02-28
Telling Effective Stories With Your Python Visualizations
2025-02-21
Behavior-Driven vs Test-Driven Development & Using Regex in Python
2025-02-14
Charlie Marsh: Accelerating Python Tooling With Ruff and uv
2025-02-07
Testing Your Python Code Base: Unit vs. Integration
2025-01-31
  • ←
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • →
012345678910111213141516171819

Get this podcast on your
phone, FREE

Download Podbean app on App Store Download Podbean app on Google Play

Create your
podcast in
minutes

  • Full-featured podcast site
  • Unlimited storage and bandwidth
  • Comprehensive podcast stats
  • Distribute to Apple Podcasts, Spotify, and more
  • Make money with your podcast
Get started

It is Free

  • Podcast Services

    • Podcast Features
    • Pricing
    • Enterprise Solution
    • Private Podcast
    • The Podcast App
    • Live Stream
    • Audio Recorder
    • Remote Recording
    • Podbean AI
  •  
    • Create a Podcast
    • Video Podcast
    • Start Podcasting
    • Start Radio Talk Show
    • Education Podcast
    • Church Podcast
    • Nonprofit Podcast
    • Get Sermons Online
    • Free Audiobooks
  • MONETIZATION & MORE

    • Podcast Advertising
    • Dynamic Ads Insertion
    • Apple Podcasts Subscriptions
    • Switch to Podbean
    • YouTube to Podcast
    • Blog to Podcast
    • Submit Your Podcast
    • Podbean Plugins
    • Developers
  • KNOWLEDGE BASE

    • How to Start a Podcast
    • How to Start a Live Podcast
    • How to Monetize a Podcast
    • How to Promote Your Podcast
    • Mobile Podcast Recording Guide
    • How to Use Group Recording
    • Podcast Advertising 101
  • Support

    • Support Center
    • What’s New
    • Free Webinars
    • Podcast Events
    • Podbean Academy
    • Podbean Amplified Podcast
    • Badges
    • Resources
  • Podbean

    • About Us
    • Podbean Blog
    • Careers
    • Press and Media
    • Green Initiative
    • Affiliate Program
    • Contact Us
  • Privacy Policy
  • Cookie Policy
  • Terms of Use
  • Consent Preferences
  • Copyright © 2015-2025 Podbean.com