<p>I got the following class :</p>

<pre><code>class ConstraintFailureSet(dict, Exception) :
    """
        Container for constraint failures. It act as a constraint failure itself
        but can contain other constraint failures that can be accessed with a dict syntax.
    """

    def __init__(self, **failures) :
        dict.__init__(self, failures)
        Exception.__init__(self)

print isinstance(ConstraintFailureSet(), Exception)
True
raise ConstraintFailureSet()
TypeError: exceptions must be classes, instances, or strings (deprecated), not ConstraintFailureSet
</code></pre>

<p>What the heck ?</p>

<p>And the worst is that I can't try super() since Exception are old based class...</p>

<p>EDIT : And, yes, I've tried to switch the order of inheritance / init.</p>

<p>EDIT2 : I am using CPython 2.4 on Ubuntu8.10. You newer know is this kind of infos is usefull ;-). Anyway, this little riddle has shut the mouth of 3 of my collegues. You'd be my best-friend-of-the day...</p>

What version of Python?
In 2.5.1, I can't even define a class the inherits from both
```
dict
```
and
```
Exception
```
:
```
```
>>> class foo(dict, Exception):
...   pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Error when calling the metaclass bases
    multiple bases have instance lay-out conflict
```
```
If you're using an older version, maybe it doesn't do this check during type definition and the conflict causes oddities later on.