Overview
Syllabus
Intro
I teach Python
Consider this code
Function objects? . When you use def. you create a function object.
Example
Error messages use this info
Additional variables
So, how does Python know?
Same goes for **kwargs
dis.show_code
Constants?
When Python calls a function...
Consider this function
Let's add a default
Keyword-only arguments
Where does Python put that?
Let's talk about scoping
How does Python know x isn't local?
Let's make things more complex
A more common version of this problem
The "global" declaration
Bytecodes with a local"X"
Putting the "E" in LEGB
What have we learned?
Questions or comments?
Taught by
PyCon US