[Tutor] Re: Help with classes
alan.gauld at freenet.co.uk
Thu Apr 7 23:28:10 CEST 2005
> >I don't think you're making proper use of classes.
> IMHO there is no "proper use of classes".
It depends on whether the OP wants to pursue OOP. There are many uses
of classes that are not related to OOP. But if we are talking about
good OOP practie then there are some uses of classes that are
> But they are related. Each represents a game command; the class is
> container for the commands. And it might be that as the program
> that there would be multiple instances representing players or saved
> or ??? And class properties would keep track of the player's status.
But in that case the class would still be badly formed since it should
be called Game or Player as appropriate.
But outside of OOP classes do make useful containers for code -
in Python with its modules there is less real need for that.
My 2 cents worth :-)
More information about the Tutor