[Tutor] creating classes while coding

Bill Allen wallenpb at gmail.com
Mon Feb 21 00:12:20 CET 2011


I know that Python not only supports OOP, but is fundamentally OOP in its
design.   Just in using the language and standard library, that much becomes
obvious.   However, I do wonder a bit about the practice I have seen of some
Python programmers to implement relatively short bits of code, that would be
quite simple using functions and procedural code, with classes.   Some such
code appears far more complicated than the job at hand really demands.   I
know there is not always a single right or wrong way of accomplishing
programming task, but why implement using classes unnecessarily?  When is it
necessary?  When is it best practice?  I'll freely admit that I do not come
from an OOP programming background, so designing classes is not my first
impulse when writing code.  Am I missing something?

--Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110220/204e3d10/attachment.html>


More information about the Tutor mailing list