Nesta live vamos conversar sobre como o sistema de imports do python funciona.
Vamos conversar sobre as diferentes formas de importação, sobre o que o python reconhece como módulo e como ele faz a associação de nomes no namespace.
Falaremos sobre o módulo sys, sobre a importlib e sobre a instrução __import__. Além de loaders, finders e specs!
-------------------
O canal é mantido por uma iniciativa de financiamento coletivo:
Apoia-se: https://apoia.se/livedepython
picpay: @dunossauro
Chave pix: [email protected]
Meus contatos e redes: http://dunossauro.com/
-------------------
Código e Slides: https://github.com/dunossauro/live-de...
Telegram da live: https://t.me/livepython
Temas das próximas lives: https://github.com/dunossauro/live-de...
----
Referências
PEPs
PEP 302: https://peps.python.org/pep-0302/
PEP 382: https://peps.python.org/pep-0382/
PEP 420: https://peps.python.org/pep-0420/
Documentação
Builtins: https://docs.python.org/3/library/bui...
Glossário: https://docs.python.org/pt-br/3/gloss...
Sistema de importação: https://docs.python.org/pt-br/3/refer...
Módulo sys: https://docs.python.org/3/library/sys...
sys path: https://docs.python.org/pt-br/3/libra...
importlib: https://docs.python.org/3/library/imp...
Código fonte:
LOAD_NAME: https://github.com/python/cpython/blo...
Import bootstrap: https://github.com/python/cpython/blo...
Issues
Documentação import: https://github.com/python/cpython/iss...
Blogs
https://tenthousandmeters.com/blog/py...