michele.simionato at gmail.com
Tue Oct 5 08:41:10 CEST 2004
Arich Chanachai <macrocosm at fastmail.fm> wrote in message
> Paul Foley wrote:
> >What on Earth can you mean by this? Python already has it, and always
> >has. What do you think "foo.bar()" is other than "pass message `bar'
> >to object `foo'"?
> What if foo doesn't know about bar(), can I tell foo that perhaps it
> should send the bar() message to...say....boo?
You want to redefine __getattr__ and __setattr__. It is pretty easy to
search the documentation for them.
More information about the Python-list