AttributeError in "with" statement (3.2.2)
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu Dec 15 02:47:05 EST 2011
On Thu, 15 Dec 2011 05:01:21 +0000, Steven D'Aprano wrote:
>> From the Python glossary:
>> "method: A function which is defined inside a class body."
>>
>> That is actually a bit too narrow, as a function can be added to the
>> class after it is defined. But the point then is that it is treated as
>> if defined inside the class body.
[...]
> But the definition as given is strictly wrong, because it fails to
> capture the essence of what distinguishes a method from other objects.
[...]
TL;DR
http://users.rcn.com/python/download/Descriptor.htm#functions-and-methods
Short and sweet.
--
Steven
More information about the Python-list
mailing list