A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/345660.html below:

Dynamically adding and removing methods

Dynamically adding and removing methodsRon Adam rrr at ronadam.com
Wed Sep 28 14:05:12 EDT 2005
Steven D'Aprano wrote:

> On Tue, 27 Sep 2005 16:42:21 +0000, Ron Adam wrote:
> 
> 
>>>>>>>def beacon(self, x):
>>>>
>>>>...    print "beacon + %s" % x
>>>>...
>>>
>>>
>>>Did you mean bacon? *wink*
>>
>>Of course... remembering arbitrary word letter sequences is probably my 
>>worst skill. ;-)  That, and I think for some reason the name Francis 
>>Beacon was in my mind at the time.
> 
> 
> I think you mean Francis Bacon *wink*

Yes, I mean him, Beacon is his fathers sirname. I'm not sure if Francis 
changed it or if his father did. (?)


> This clearly shows that assigning a function to a class attribute invokes
> whatever machinery Python uses to turn that function into a true method,
> but assigning it to an instance does not.

Actually I think I'm getting more confused.  At some point the function 
is wrapped.  Is it when it's assigned, referenced, or called?

Cheers,
Ron







More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4