The Real Python Podcast

Generators, Coroutines, and Learning Python Through Exercises


Listen Later

Have you started to use generators in Python? Are you unsure why you would even use one over a regular function? How do you use the special “send” method and the “yield from” syntax? This week on the show, we have Reuven Lerner to talk about his PyCon Africa 2020 talk titled “Generators, coroutines, and nanoservices.”

Reuven helps developers around the world become more fluent in Python. We talk about some of his teaching techniques and also how he continues to learn. Reuven is a believer in the continued practice of Python through exercises. We discuss his book “Python Workout” and his Weekly Python Exercise courses.

Course Spotlight: Python Generators 101

In this step-by-step course, you’ll learn about generators and yielding in Python. You’ll create generator functions and generator expressions using multiple Python yield statements. You’ll also learn how to build data pipelines that take advantage of these Pythonic tools.

Topics:

  • 00:00:00 – Introduction
  • 00:01:38 – Reuven’s web site: Teaching Python and Data Science around the world
  • 00:03:39 – Training remotely and screen-time overload
  • 00:07:03 – Info-tainment and sparking engagement
  • 00:11:05 – PyCon Africa 2020 - Generators, Coroutines, and Nanoservices
  • 00:13:34 – Using dis() - disassembler for Python bytecode
  • 00:15:09 – Exceptions as signals, not exclusively for errors
  • 00:17:39 – What makes generator functions different?
  • 00:22:05 – Using .send() and creating a coroutine
  • 00:23:39 – Sponsor: Scout APM
  • 00:24:40 – Stopping the generator with .throw()
  • 00:26:28 – Additional uses for generators
  • 00:30:03 – Python Workout: 50 ten-minute exercises
  • 00:34:22 – A combination of techniques and sources for continued learning
  • 00:40:15 – Weekly Python Exercise
  • 00:42:02 – Video Course Spotlight
  • 00:43:08 – Bachelor degree in CS, but a Doctorate in learning sciences
  • 00:48:26 – What are additional techniques you use to keep learning?
  • 00:50:18 – Teaching is a great way to keep learning
  • 00:51:28 – What areas of data science are you focusing on?
  • 00:53:22 – The Business of Freelancing: podcast
  • 00:56:26 – What is something you thought you knew about Python, but were wrong about?
  • 00:59:24 – What is something you are excited about in the world of Python?
  • 01:02:18 – Conferences and user groups
  • 01:05:03 – Thanks and goodbye
  • Show Links:

    • Teaching Python and Data Science around the world: Reuven’s Training Site
    • Reuven’s newsletter
    • Generators, Coroutines, and Nanoservices: Pycon Africa 2020
    • PEP 255 – Simple Generators: Python docs
    • How to Use Generators and yield in Python: Real Python article
    • dis — Disassembler for Python bytecode: Python docs
    • Exception Handling: Python docs
    • Python Workout : 50 ten-minute exercises - Manning
    • Weekly Python Exercise Course
    • Luis Serrano: machine learning & math made easy - YouTube channel
    • The Business of Freelancing: Podcast
    • RPP Episode 29: Resolving Package Dependencies With the New Version of Pip
    • Sign-up for pip UX Studies!
    • Level up your Python skills with our expert-led courses:

      • Grow Your Python Portfolio With 13 Intermediate Project Ideas
      • Python Generators 101
      • Speed Up Python With Concurrency
      • 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

        624 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

        298 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

        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

        190 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