Implementation Advice

phil hunt philh at comuno.freeserve.co.uk
Fri Mar 15 18:16:14 EST 2002


On Fri, 15 Mar 2002 10:28:10 -0800, Ken <khirmint at hotmail.com> wrote:
>Hey everyone..
>
>I'm trying to create a system where users log in, and based on how they log
>in or who they log in as, they get a different set of functionality.
>
>A really simple example would be a multi-room chat, where each room has some
>common functionality (ie.send/receive messages) and some extras like
>different color text.
>
>I'd like to keep the functionality for each room in a separate file.
>
>My question is, should each file have a class declaration (using inheritance
>where appropriate) containing the necessary additional functions,
>initialization, etc.. Or, should each file contain a series of functions?
>One common to all files to initialize a room and then modify it and add
>functions to it as necessary?

I'd use classes.

-- 
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically 
advantageous for him to believe." 
                        -- Alison Brooks, referring to Michael
                              Portillo, on soc.history.what-if



More information about the Python-list mailing list