Is this..... evil?

Philip Swartzleonard starx at pacbell.net
Sat Feb 9 15:35:32 EST 2002


Gerson Kurz || Sat 09 Feb 2002 11:21:29a:

> On 9 Feb 2002 18:21:31 GMT, Philip Swartzleonard <starx at pacbell.net>
> wrote:
> 
>>Anyway, i was just wondering, since this seems so great, is there 
>>anything wrong with doing things this way that i'm not seeing? 
> I've been using code like that quite frequently, so if its bad, I'm in
> for it, too.

=)
 
>>Also, is there any real reason to have the message classes inherit when 
>>the only thing that seems to identify them is an attribute? 
> No, it works if you omit the "Message" Inheritance. You could use
> plain strings and have the same effect. 

Well, i need to have data stuck on the message for whatever recives it, so 
each should have it's own init prolly. map.shpere_msg(12,13,14, M_Damage( 
type = dam.fire | dam.plasma, value=40000) ), or something to that effect 
:)

What i'd like to know is, is there a benefit to using an inherited system 
(like there is for say, exceptions, where you can catch base classes). 
Would it be better to define a message that passes through a certain 
substance as a mixin or base class, or by a attribute passes_vaccum=1 type 
of thing (though it would be more likely to do a more in-depth analysis of 
the object to detrmine this :)

Thanks, though :) 



-- 
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com



More information about the Python-list mailing list