ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

"See CPython run: Getting to know your Python interpreter" - James Bennett (North Bay Python 2019)

nbpy

nbpy19

JamesBennett

Автор: North Bay Python

Загружено: 2019-11-03

Просмотров: 24596

Описание: James Bennett

https://2019.northbaypython.org/sched...

Python is a pretty neat language, but without an interpreter it doesn't do much. And although lots of people use the CPython interpreter (which is the main implementation of the Python language) every day, its workings are still a mystery even to many experienced Python programmers. So rather than explain features of Python the language, this talk will cover the interpreter itself, how it runs your code, and how you can use knowledge of the interpreter to figure out why your Python code behaves the way it does.

To get started, we'll briefly look at some real questions asked on Python forums, wondering about strange, or at least unexplained, behaviors of Python. Like: Why does a different way of writing the same code sometimes run faster? Why does the behavior of the `is` operator seem to be inconsistent for some kinds of values? And what's the deal with all those ".pyc" files Python likes to leave all over the place? How and where would we start looking for answers to these?

Then we'll take a look at the overall life cycle of Python code. We'll start with Python source code, and see how Python parses it into an abstract syntax tree (AST), how you can ask Python to show you the AST for a given piece of code, and how to read and understand it. Next we'll look at the transformation from AST to Python bytecode, what a Python code object looks like and how it's built, and how you can access it and understand the bytecode. Finally we'll see how the CPython virtual machine runs the compiled bytecode, and what's going on as it does so.

Then we'll dive into the infrastructure of the interpreter, pointing out where to go to see things like the low-level implementations of Python's built-in types, the bytecode interpreter loop, the AST and bytecode optimizers, and more, along with tips on how the interpreter's source code is organized and how to find and read things you're interested in.

Finally we'll circle back to some of the original questions about Python behavior, and see how they can be answered by using knowledge of how the CPython interpreter works, along with tools and tactics for making it easier to dig into what Python's doing with your code, and references for further reading and learning.

You might run a Python interpreter multiple times a day, but do you really know what it's doing while it runs your code? And if Python is doing something that seems strange, where might you start looking to figure out why? Come find out in this guided tour of how the CPython interpreter works!

A Python conference north of the Golden Gate


North Bay Python is a single-track conference with a carefully curated set of talks representing the diverse Python community and their different areas of interest.

If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theatre to catch up and chat.

Our goal is to keep prices as low as possible. That means we won't be catering lunch. Instead, you can look forward to extra-long lunch breaks you can use to explore all of the great food options around the venue.

Produced by NDV:    / @nextdayvideo  

Sat Nov 2 14:30:00 2019 at Mystic Theatre

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
"See CPython run: Getting to know your Python interpreter" - James Bennett (North Bay Python 2019)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

"What is a Coroutine Anyway?" - John Reese (North Bay Python 2019)

GIL в Python: зачем он нужен и как с этим жить

GIL в Python: зачем он нужен и как с этим жить

"How To Build a Terrible Robot" - Paloma Fautley (North Bay Python 2019)

"Writing a PEG parser for fun and profit" - Guido van Rossum (North Bay Python 2019)

Guido van Rossum explains Python programming

Guido van Rossum explains Python programming

Implementing a Lox interpreter in Rust

Implementing a Lox interpreter in Rust

Memory Management in Python - The Basics

Memory Management in Python - The Basics

Anjana Vakil - Exploring Python Bytecode

Anjana Vakil - Exploring Python Bytecode

01. Устройство CPython – Егор Овчаренко

01. Устройство CPython – Егор Овчаренко

"Python In The Small" - Glyph (Nbpy2025)

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]