<div dir="ltr">Hi,<br><br><div class="gmail_extra"><br><div class="gmail_quote">On 6 November 2013 08:58, Mark Lawrence <span dir="ltr"><<a href="mailto:breamoreboy@yahoo.co.uk" target="_blank">breamoreboy@yahoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On 06/11/2013 02:19, Steven D'Aprano wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Tue, Nov 05, 2013 at 03:55:05PM -0800, Johan Martinez wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I need help in modifying my program. Right now it looks as follows:<br>
</blockquote>
[snip code]<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Can someone help me in improving my code?<br>
</blockquote>
<br>
Yes! The first thing to do is get rid of the unnecessary class. This is<br>
not Java where you have to write classes for everything. From the sample<br>
code that you show below, using OOP here accomplishes nothing except<br>
making the code more complicated and less efficient.<br>
<br>
</blockquote>
<br></div>
Big +1 from me :)<span class=""><font color="#888888"></font></span></blockquote><div><br><br>To belabor the point further, watch this video by Jack Diederich from Pycon 2012 entitled "Stop writing classes":<br>
<a href="http://www.youtube.com/watch?v=o9pEzgHorH0">http://www.youtube.com/watch?v=o9pEzgHorH0</a><br><br></div><div>(Don't get me or this video wrong -- classes have their uses but too often developers try to fit stuff into class structures when the code/problem really isn't asking for/suits it.)<br>
</div><div><br></div><div>Walter<br></div></div></div></div>