OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])
Lee Cullens
lee_cullens at mac.com
Thu Jun 9 00:25:16 EDT 2005
Thanks for the comment Dan,
Yes, that much I'm aware of. I just thought I'd refactor my little
utility in an OO approach as an exercise. What I've learned so far
is that my non-OO approach is in this situation very efficient,
succinct and non-duplicative. Except for avoiding multiple argument
passing (globals not even considered ;') there seems little to be
gained. Even so, one learns best by doing and I'm gaining a better
understanding of OOP (and where to apply such). The oak trees are
hard on this old head though :~)
Thanks again,
Lee C
On Jun 8, 2005, at 11:40 PM, python-list-request at python.org wrote:
> Subject: Re: OO re-factoring (was Pythonese/Efficiency/Generalese
> critique [on Tutor])
>
>
> Dan Sommers wrote:
>
>
>> I don't remember the original post, but methods and recursion are
>> *not*
>> mutually exclusive (e.g., an Integer class with a factorial
>> method, or a
>> binary tree class whose nodes are also binary trees).
>>
>
> Also, don't think that you have to make everything OO.
> OO isn't necessarily better than non-OO. It's a means
> to an end, not an end in itself.
>
> --
> Greg Ewing, Computer Science Dept,
> University of Canterbury,
> Christchurch, New Zealand
> http://www.cosc.canterbury.ac.nz/~greg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050609/71bd568e/attachment.html>
More information about the Python-list
mailing list