callable classes

Duncan Smith buzzard at urubu.freeserve.co.uk
Fri Dec 26 13:16:56 EST 2003


I recently started to rewrite a class and decided to take a bunch of related
methods and put them in a separate callable class.  (They're all what I
would call pointwise operations on pairs of instances, they raise exceptions
for identical reasons, and they all return a new instance).  It seemed like
a good idea at the time, but now I'm not so sure.  So my very general
questions are:

Is this a reasonable use for a callable class?

In what circumstances are callable classes particularly useful?  (Maybe I
haven't racked my brains long enough.)

Cheers.  TIA.

Duncan





More information about the Python-list mailing list