Jeff Hardy wrote:
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
Wouldn't that particular example bomb out on CPython as well - you need
to override __new__ on the immutable builtins surely?
Michael
Thanks,
Jeff
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com