Talk: Elizaveta Shashkova - The Hidden Power of the Python Runtime

preview_player
Показать описание
Presented by:
Elizaveta Shashkova

Many people like Python for its simplicity and beauty. But every statement in Python, even the simple one, produces a lot of events during the program execution. These events are usually hidden from a user, so it helps developers to skip low-level implementation details and focus on bigger things.

At the same time many parts of this hidden information are very useful and interesting to examine. The good news is that the Python Runtime allows to retrieve it really simply, so there is no need to configure additional libraries or pass additional parameters to interpreter. Everybody can do it right inside their Python code.

During this talk we will learn how Python allows to inspect current program state during the execution. We will learn about Python memory model, variables, frame objects and about useful information they store. After that we will discuss several powerful tools which are based on the runtime information and which can be very helpful for any Python programmer in their everyday life.

Рекомендации по теме
Комментарии
Автор

This was a really great talk. Thanks to everyone who helped in bringing this up ✨👍

bhupeshimself
Автор

Thanks for your talk. It was a really interesting topic :)

sitronco
Автор

I have a question regarding static type checkers. Tools like mypy, pyright, etc. are probably using functionalities mentioned by you in this presentation. I'm wondering how those tools could work, for example: I annotated my function like this "def fun(var: str) -> List[Dict[str, int]]". How can I check whether my function is returning that type or not? A simple type() call would only return information that variable is a list type. Also, we could probably gather full information about that variable only in run time, but yet those tools can analyze code without running the code.

NestiGX