What do you call a class not intended to be instantiated

Aahz aahz at pythoncraft.com
Fri Sep 26 06:17:14 CEST 2008

In article <y9udnWtzwLtQi0rVnZ2dnUVZ_gidnZ2d at earthlink.com>,
Dennis Lee Bieber  <wlfraed at ix.netcom.com> wrote:
>On 21 Sep 2008 22:39:47 GMT, Steven D'Aprano
><steve at REMOVE-THIS-cybersource.com.au> declaimed the following in
>> What do you call such a class?
>	A wasted definition... The same functionality is achieved by just
>creating and importing a module. Your "class methods" would just be
>functions within the module; class level attributes would be module
>level objects (access with global if writing to them, use a _ to
>indicate "internal")

Seems to me that if all the module is used for is to store state, you're
wasting a file on disk.  I personally prefer to use a class singleton.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach

More information about the Python-list mailing list