tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code28:05

Talk: Reuven M. Lerner - Function dissection lab -- learn how functions

PyCon US ↗

From the creator

Presented by: Reuven M. Lerner When you invoke a function, how does it know how many arguments to expect? How does it distinguish between local and global (and enclosing) variables? How does it know that you defined the function with args and/or *kwargs? And where does it store such things as docstrings, annotations, and defaults? The short answer is that Python functions are objects – no different from integers, strings, and dicts. And like all other bjects, functions have attributes. It turns out that those attributes are the source of functions’ power. In this talk, we’ll peek into function attributes, gaining an understanding of (and appreciation for) the way in which functions are built. We’ll also see the relationship between attributes, functions, and Python bytecodes. And while we’ll be dissecting many functions, I can assure you that none of them will be harmed in our quest for deeper understanding. Talk resources: http://FunctionDissectionLab.com

Published 2020-04-29 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code