What happens when you import a module? - presented by Reuven M. Lerner

  Рет қаралды 4,177

EuroPython Conference

EuroPython Conference

Күн бұрын

EuroPython 2022 - What happens when you import a module? - presented by Reuven M. Lerner
[The Auditorium on 2022-07-13]
Modules are a key feature of Python, allowing us to easily reuse our own code and take advantage of publicly available modules from PyPI. It's a rare program that doesn't include at least one "import" statement. But what actually happens when we import a module? How does Python find our file? How does it decide whether it should even try to find our module? And after it finds our module file, how does Python load it into memory, assigning to its attributes?
In this talk, I'll walk you through what happens when you "import" a module into Python. The mechanism is surprisingly complex, in no small part because it has to take so many possibilities into consideration. We'll talk about finders and loaders, and about the many ways in which you can customize the module-loading mechanism if you find a need to do so.
If you've ever imported a module, then this talk will pull back the curtain a bit, helping you to understand what's happening under the hood.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License creativecommons...

Пікірлер
CPython Developer Panel
1:01:44
EuroPython Conference
Рет қаралды 2,1 М.
Writing Faster Python 3 - presented by Sebastian Witowski
42:05
EuroPython Conference
Рет қаралды 17 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Protocols in Python: Why You Need Them - presented by Rogier van der Geer
28:40
EuroPython Conference
Рет қаралды 11 М.
Reuven M. Lerner - Practical decorators - PyCon 2019
29:12
PyCon 2019
Рет қаралды 42 М.
Demystifying Python’s Internals - presented by Sebastiaan Zeeff
29:26
EuroPython Conference
Рет қаралды 4,8 М.
`typing.Protocol`: type hints as Guido intended - presented by Luciano Ramalho
44:40
Keynote: Multithreaded Python without the GIL - presented by Sam Gross
53:26
EuroPython Conference
Рет қаралды 20 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 16 М.