Is this considered black magic?

Scherer, Bill Bill.Scherer at VerizonWireless.com
Mon Nov 12 13:33:59 EST 2001


On Mon, 12 Nov 2001, Rainer Deyke wrote:

> "Scherer, Bill" <Bill.Scherer at VerizonWireless.com> wrote in message
> news:mailman.1005585556.28492.python-list at python.org...
> >
> > On Mon, 12 Nov 2001 17:02:38 +0100, Laura Creighton <lac at strakt.com>
> wrote:
> > (snip)
> > >I have a new problem.  I've just lost a major amount of precision in my
> > >language usage.  What is the collective noun for 'attributes that aren't
> > >methods (you can't call them)'?
> >
> > UML refers to methods as 'operations', and the uncallable
> > attributes as 'attributes'...
> 
> I don't know UML, but I suspect this is a different distinction.  Consider:
> 
> class Widget:
>   def __init__(self, callback): self.callback = callback
>   def go(self): return self.callback()
> 
> Would a Widget's 'callback' attribute really be considered an 'operation' in
> this context?

Good point. No, I suspect it wouldn't.  It would probably be 
indicated on a class diagram via an association to the class 
that implements the callback, where it would be an operation.  I 
don't know what they call that, but I suppose it's a 'delegated 
operation' or 'aggregated operation'



> --
> Rainer Deyke (root at rainerdeyke.com)
> Shareware computer games           -           http://rainerdeyke.com
> "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
> 
> 
> 

-- 
Bill.Scherer at Verizon Wireless
RHCE 807101044903581





More information about the Python-list mailing list