Re: How does "delegation" work as per the FAQ?
From: Jeff Epler (jepler_at_unpythonic.net)
Date: 12/25/03
- Next message: Brandon J. Van Every: "Re: ProtoCiv: porting Freeciv to Python"
- Previous message: Serge Orlov: "Re: print arabic characters"
- In reply to: Rene Pijlman: "Re: How does "delegation" work as per the FAQ?"
- Next in thread: Mike C. Fletcher: "Re: How does "delegation" work as per the FAQ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Dec 2003 14:20:57 -0600 To: Rene Pijlman <reply.in.the.newsgroup@my.address.is.invalid.unpythonic.net>
In Python, there's little difference between
f = o.m
f(3)
and
o.m(3)
either way, the attribute 'm' is looked up on o in exactly the same
way. So the delegation pattern works no matter whether 'o.m' is a
method or is data.
Jeff
- Next message: Brandon J. Van Every: "Re: ProtoCiv: porting Freeciv to Python"
- Previous message: Serge Orlov: "Re: print arabic characters"
- In reply to: Rene Pijlman: "Re: How does "delegation" work as per the FAQ?"
- Next in thread: Mike C. Fletcher: "Re: How does "delegation" work as per the FAQ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|