Contribute Media
A thank you to everyone who has made this possible: Read More

Know thy self: Methods and method binding

Description

Methods are like functions, but different. How? Why? And what's will having to type "self" all the time?

We'll explore partial application of functions and review why it might be nice to start using classes. Then to clarify how method objects work we'll examine the result of accessing the method attributes of an object without calling them. Understanding the behavior we uncover here will require more attribute lookup experiments, which will lead us discover the power of descriptors.

Along the way we'll peek in at other languages' approaches to method binding, hopefully coming to appreciate the way Python does things enough to type "self" a few thousand more times.

Details

Improve this page