[IronPython] Django, __unicode__, and #20366

Dino Viehland dinov at microsoft.com
Mon Feb 1 22:46:55 CET 2010

> How about having str and unicode as different objects internally - so
> IronPython can tell the difference - but fake equality and identity
> checks *inside* IronPython. :-)
> Or do something a bit similar to what Python 3 does with super...
> Compile different code for str(...) and unicode(...). I think I prefer
> that to the above. :-)

Messing with identity starts to get really scary and I'd rather not go
there - I'm sure there will be lots of edge cases which will be broken.  

I could see is making unicode(foo) do something different.  If you aliased 
unicode then you'd get str's behavior though but that might be perfectly 
acceptable.  It's definitely a solution I had not considered and it'd 
probably fix multiple issues.

More information about the Ironpython-users mailing list