Steven D'Aprano wrote:

> Both K.f and K.g are methods, even though only one meets the definition
> given in the glossary. The glossary is wrong.

Oh I'm sure somebody is going to pick me up on this... 

In Python 2, they are methods. In Python 3, they are functions, and aren't
converted into methods until you access them via the instance:

K.f returns the function f

instance.f typically retrieves the function f from K, and converts it to a
method object bound to instance



-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to