[Tutor] Creating class / OOP structure

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Nov 6 09:58:59 CET 2013


On 06/11/2013 02:19, Steven D'Aprano wrote:
> On Tue, Nov 05, 2013 at 03:55:05PM -0800, Johan Martinez wrote:
>> I need help in modifying my program. Right now it looks as follows:
> [snip code]
>> Can someone help me in improving my code?
>
> Yes! The first thing to do is get rid of the unnecessary class. This is
> not Java where you have to write classes for everything. From the sample
> code that you show below, using OOP here accomplishes nothing except
> making the code more complicated and less efficient.
>

Big +1 from me :)

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence



More information about the Tutor mailing list