Detecting a new style class

Aahz aahz at pythoncraft.com
Tue Apr 23 14:21:46 EDT 2002


In article <mailman.1019552082.8541.python-list at python.org>,
Graham Ashton  <gashton at cmedltd.com> wrote:
>
>I find that the behaviour varies depending on the order in which a
>class's super classes are defined. In the example below, I'd like the
>instantiation of class B to throw the same RuntimeError as A:
>
>Python 2.2 (#2, Mar 11 2002, 13:24:00) 
>[GCC 2.95.3 20010315 (release)] on linux2
>Type "help", "copyright", "credits" or "license" for more information.
>>>> from AbstractSingleton import AbstractSingleton
>>>> class A(AbstractSingleton, object):
>...   pass

Maybe you should tell us a bit more about what you're trying to do so
that you needn't rely on crufty internal stuff to get the correct result.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

What if there were no rhetorical questions?



More information about the Python-list mailing list