Re: Python Macros
From: Michele Simionato (michele.simionato_at_gmail.com)
Date: 10/05/04
- Next message: Richard Blackwood: "Re: New to Python: Features"
- Previous message: Andrew Dalke: "Re: New to Python: Features"
- In reply to: Arich Chanachai: "Re: Python Macros"
- Next in thread: G. S. Hayes: "Re: Python Macros"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 4 Oct 2004 23:41:10 -0700
Arich Chanachai <macrocosm@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.
Michele Simionato
- Next message: Richard Blackwood: "Re: New to Python: Features"
- Previous message: Andrew Dalke: "Re: New to Python: Features"
- In reply to: Arich Chanachai: "Re: Python Macros"
- Next in thread: G. S. Hayes: "Re: Python Macros"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|