FYI this is fixed in the 2.6 branch now.

> -----Original Message-----
> From: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
> Sent: Tuesday, March 17, 2009 5:03 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] CP Issue #21659: Subclassing unicode
> 
> On Mon, Mar 16, 2009 at 7:03 PM, Dino Viehland <di...@microsoft.com>
> wrote:
> > Does this make it work?
> >
> > class x(unicode):
> >    def __init__(self, val): pass
> >    def __new__(cls, val):
> >            return unicode.__new__(cls, unicode(val))
> >
> >
> > x(1)
> >
> > I've voted for the bug and raised the priority to medium.  I've left
> it proposed until we triage it as a team (we triage bugs every Monday
> morning so it'll be a week) but I might be able to fix it before then
> :)
> >
> 
> Thanks, that did it. I had to extend it to handle all of the
> parameters to unicode:
> 
> def __new__(cls, object = '', *args, **kwargs):
>         return unicode.__new__(cls, unicode(object), *args, **kwargs)
> 
> Only 227 more failures to go (out of 701, so not too bad).
> 
> - Jeff
> _______________________________________________
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to