What do you call a class not intended to be instantiated

Calvin Spealman ironfroggy at gmail.com
Mon Sep 22 01:39:08 CEST 2008

I call it an obvious misuse and misunderstanding of why you'd use a class in
the first place. Either create an instance and not make these things
classmethods or just share the stuff in a module-level set of variables. But
the instantiating is the best options. Your class attributes might not be
globals, but you're still using global state and you should avoid it where
you can.

On Sun, Sep 21, 2008 at 6:39 PM, Steven D'Aprano <
steve at remove-this-cybersource.com.au> wrote:

> I have a class which is not intended to be instantiated. Instead of using
> the class to creating an instance and then operate on it, I use the class
> directly, with classmethods. Essentially, the class is used as a function
> that keeps state from one call to the next.
> The problem is that I don't know what to call such a thing! "Abstract
> class" isn't right, because that implies that you should subclass the
> class and then instantiate the subclasses.
> What do you call such a class?
> --
> Steven
> --
> http://mail.python.org/mailman/listinfo/python-list

Read my blog! I depend on your acceptance of my opinion! I am interesting!
Follow me if you're into that sort of thing:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080921/070a0ae9/attachment.html>

More information about the Python-list mailing list