Re: Adding bound methods dynamically... CORRECTED
- From: bruno modulix <onurb@xxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 11:04:56 +0200
Devan L wrote:
> Kevin Little wrote:
>
>>I want to dynamically add or replace bound methods in a class.
(snip)
> I'm not an expert, but why do you need to dynamically add or replace
> bound methods?
To modify the behaviour at runtime ?-)
There are a lot of idioms/patterns in dynamic languages that seems
somewhat alien at first, then become an obvious solution. When I
discovered first-class functions and anonymous functions with Python
some years ago, I wondered what could be the use of such things. Now I
couldn't live without...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb@xxxxxxxxxxx'.split('@')])"
.
- References:
- Adding bound methods dynamically...
- From: Kevin Little
- Re: Adding bound methods dynamically... CORRECTED
- From: Kevin Little
- Re: Adding bound methods dynamically... CORRECTED
- From: Devan L
- Adding bound methods dynamically...
- Prev by Date: Re: Code run from IDLE but not via double-clicking on its *.py
- Next by Date: Re: Python doc problems example: gzip module
- Previous by thread: Re: Adding bound methods dynamically... CORRECTED
- Next by thread: Re: Adding bound methods dynamically...
- Index(es):
Relevant Pages
|