[IronPython] CP Issue #21659: Subclassing unicode

Jeff Hardy jdhardy at gmail.com
Tue Mar 17 01:44:39 CET 2009


Hi,
Is there any quick workaround for #21569? It's causing about a third
of the Genshi errors I'm hitting. Trying to override __init__ in the
subclass gives the same error.

class Foo(unicode):
    def __init__(self, val):
        pass

f = Foo(1)

Traceback (most recent call last):
  File "foo.py", line 5, in __main__
TypeError: expected str, got int

Thanks,
Jeff



More information about the Ironpython-users mailing list