Python Macros

Michele Simionato michele.simionato at
Tue Oct 5 08:41:10 CEST 2004

Arich Chanachai <macrocosm at> 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 "" 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

You want to redefine __getattr__ and __setattr__. It is pretty easy to
search the documentation for them.

            Michele Simionato

More information about the Python-list mailing list