Talk Python To Me cover image

#369: Getting Lazy with Python Imports and PEP 690

Talk Python To Me

00:00

Using Lazy Imports, Is That a Good Idea?

With lazy imports, you can basically pay for what you use every time. The transparent aspect of it is that we write code the way we traditionally wrote We write import requests, or import jason or whatever, at the top. It's actually a standard dictionary for the madel but it's just a specialized look up function. So when that deferred object gets installed into the maduls dictionary, and this is e i think it's really key, because at the point at which that the dictionary look up function finds this deferred object, that's when the object is resolved.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app