Class vrs. function
Paul Prescod
paul at prescod.net
Sat Jul 1 15:12:01 EDT 2000
Bob van der Poel wrote:
>
> ...
>
> Is this just a good habit being developed by those who think that
> classes are better than functions, or god forbid, inline code?
Given what you've said, that one-function class looks pretty bizarre. Is
there maybe something else useful about it that you haven't noticed?
Classes are not better than functions. They are just different. In most
cases, you use classes when you need to combine data and instructions.
--
Paul Prescod - Not encumbered by corporate consensus
The calculus and the rich body of mathematical analysis to which it
gave rise made modern science possible, but it was the algorithm that
made the modern world possible.
- The Advent of the Algorithm (pending), by David Berlinski
More information about the Python-list
mailing list