[IronPython] Django, __unicode__, and #20366

Dino Viehland dinov at microsoft.com
Tue Mar 16 22:11:29 CET 2010

Jeff wrote:
> On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehland <dinov at microsoft.com> wrote:
> > We could make % on a Unicode literal do something special much like
> > we're doing for calls to unicode(...).  Alternately we could make %
> > try to invoke __unicode__ before __str__ - but that would sometimes
> > be wrong.  Probably not very often, it's hard to imagine someone
> > defining __unicode__ and expecting __str__ to be returned with
> > a significant difference.
> Fixing up u"..." literals is probably the lowest impact change,
> especially for a point release. You never know what crazy stuff people
> might do.

This change is checked in now - we'll now call __unicode__ on an object
on the RHS if you do something like:

u'%s' % (some_object, )

It's currently in Main but I'll integrate it over to 2.6 later this week.

More information about the Ironpython-users mailing list