[Tutor] Old School

Dinesh B Vadhia dineshbvadhia at hotmail.com
Fri Apr 11 15:33:27 CEST 2008


I belong to the Old School where getting my head around OO is just one big pain.  I write software by modularization executed as a set of functions - and it works (some call this functional programming!).  Whenever I review Python books (eg. Lutz's excellent Programming Python, 3ed) the code is laid out with Def's followed by Classes (with their own Def's) which is as it should be.  But, the Def's on their own (ie. not in Classes) are all of the form:

> def abc(self):
        <do something>
        return <return list>

or,

> def xyz(self, <parameter list>):
        <do something>
        return <return list>

I don't use 'self' in my def's - should I?  If so, why?

Thanks!

Dinesh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080411/0c44b643/attachment.htm 


More information about the Tutor mailing list