Overloading str in Python
<p>I have code that looks like the following:</p>

<pre><code>class C(str):
    def __init__(self, a, b):
        print('init was called!')
        super().__init__(b)

        self.a = a


c = C(12, 'c')
</code></pre>

<p>When I try to run it, it gives me the following error:</p>

<pre><code>Traceback (most recent call last):
  File "C:\Users\math4tots\eclipseMeta\hemi\SalgebraPL\sapl.py", line 15, in &lt;module&gt;
    c = C(12, 'c')
TypeError: coercing to str: need bytes, bytearray or buffer-like object, int found
</code></pre>

<p>I am pretty confused. It doesn't even seem as though my init method was called. What's going on?</p>

<p>I'm not sure if it's relevant, but I'm using Python 3.2</p>
