Serge Aurubin

SERGE AURUBIN

DATA SCIENTIST

Welcome to my blog for everything having to do with data science and analysis. I am always looking for new opportunities to drive business insight using data analysis.

Data & Analytics
  • Data Analysis
  • Power BI
  • Excel
  • Data Pipelines
  • Matillion
Engineering
  • Software Developer
  • Python
  • PHP
  • ReactJS
  • Flutter
  • Front End Dev
  • Back End Dev
Databases
  • MySQL Dev/DBA
  • Oracle DBA
Cloud & AI
  • Amazon Web Services
  • Docker
  • Kubernetes
  • Git
  • Artificial Intelligence
  • Claude
  • OpenAI
Back to Videos

Watch out for this (async) generator cleanup pitfall in Python

mCoding

September 20, 2024   1

Watch out for this common generator pitfall.

What happens to a try/finally, with block, or async with block inside a generator if the generator isn't exhausted? Does the cleanup code still run? When and how does it run? In this video we take a look at the answers to these questions and learn how to avoid a common situation where cleanup code doesn't run when you want it to.

― mCoding with James Murphy (https://mcoding.io)

PEP 533: https://peps.python.org/pep-0533/
Discussion on GH issue: https://github.com/python/cpython/issues/88684

Source code: https://github.com/mCodingLLC/VideosSampleCode

SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
https://patreon.com/mCoding

Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE

Want to donate crypto? Check out the rest of my supported donations on my website!
https://mcoding.io/donate

Top patrons and donors: Laura M, Neel R, Dragos C, Jameson, Matt R, Pi, Vahnekie, Johan A, Mark M, Mutual Information

BE ACTIVE IN MY COMMUNITY ????...

0 Comments

No comments yet. Be the first to weigh in.

Back to Videos

Login