Metaprogramming in Python - (More) Python Basics for Experts 1 (Part 4)
Upcoming events: https://learning.dutc.io/
Discord: https://discord.gg/ZhJPKYSfNp
YouTube: https://www.youtube.com/@dutctv
DUTC Weekly: https://bit.ly/expert-python
Twitter: https://twitter.com/dutc_training
LinkedIn: https://www.linkedin.com/company/do-n-t-use-this-code/
Website: http://www.dontusethiscode.com/
How do things really work? What’s going on behind the scenes? How much of this really matters; how much does one REALLY need to know?
This Session Details:
Target Level: Novice/Intermediate†
Prerequisites: strong familiarity with basic Python syntax
† Note: this session is designed for ambitious (!) novices—it will be fast-paced, dense session, and packed with critical subtleties & nuances but will cover ground you have likely trod before.
Abstract
In this session, our goal is to talk about the design of the Python language and to gain a better understanding of the motivation and metaphors behind common features and functionalities.
We will look to answer the following questions:
• What is the design thinking behind @property? Where does it come up in practice? What are the different ways to avoid “update anomalies” using @property (and when do I decide which approach to use)?
• What is the design thinking behind @classmethod? Where does it come up in practice? What is a “nominal decomposition of a bounded modality,” and how does knowledge of this pattern affect my work?
• How do I decide what parts of the Python object model to implement?
• When is something an instancemethod and when is something a __getattr__ or a __getitem__ or a __call__?
• What is a metaclass? What is __build_class__ and __init_subclass__? Where do they show up in real code?
• What is a class decorator? How is it distinct from __init_subclass__?
• What is inheritance? What is composition? What other options exist in Python beyond these two choices (e.g., mechanical construction)?
Series Overview
In this seminar series, we will pick up where we left off in our “Python Basics for Experts” seminar series held in December 2021. In that series, we answered questions about the built-in data types, about the core language syntax, and about major features. We started each question by presenting the most basic perspective —the thing that catches your curiosity, that makes you go “hmm,” that gets you digging—then discussed mechanics, motivations, metaphors, and meaning from the perspective of an expert. Finally, we wrapped back around to how each of these questions and each of these topics will have immediate, material impact on your code… irrespective of whether you are a beginner or an expert!
Lesson plan: How are things created?
In our second seminar in this series, we will answer questions about the parts of the Python runtime you may not typically consider—e.g., the construction of modules on import, the construction of types via the class statement, the construction of functions via the def statement. How do these things come into being, and how can they affect our code?
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Metaprogramming in Python - (More) Python Basics for Experts 1 (Part 4)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.