On Tue, Jan 13, 2015 at 3:57 PM, Steven D'Aprano <st...@pearwood.info> wrote: > On Tue, 13 Jan 2015 09:35:43 +1100, Chris Angelico wrote: > >> Subclassing bool breaks this invariant, unless you never instantiate the >> subclass, in which case it's completely useless. > > Not necessarily. A class that you never instantiate, but use as an object > itself, is another way of implementing the singleton design pattern. > Obviously all the methods have to be class methods, but it is doable. > > But wacky exceptions like subclasses that aren't instantiated aside, > normally if you subclass something you intend to instantiate it.
True, I should have said "probably useless" instead of "completely useless". :) There's always *something* you could do with it. ChrisA -- https://mail.python.org/mailman/listinfo/python-list