I have code that looks like the following:
class C(str):def __init__(self, a, b):print('init was called!')super().__init__(b)self.a = ac = C(12, 'c')
When I try to run it, it gives me the following error:
Traceback (most recent call last):File "C:\Users\math4tots\eclipseMeta\hemi\SalgebraPL\sapl.py", line 15, in <module>c = C(12, 'c')
TypeError: coercing to str: need bytes, bytearray or buffer-like object, int found
I am pretty confused. It doesn't even seem as though my init method was called. What's going on?
I'm not sure if it's relevant, but I'm using Python 3.2