[IronPython] Django, __unicode__, and #20366

Dino Viehland dinov at microsoft.com
Tue Feb 16 00:41:44 CET 2010


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.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Monday, February 15, 2010 3:32 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Django, __unicode__, and #20366

On Mon, Feb 15, 2010 at 4:13 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Is the template string really a constant in the case that you care about?

Yeah, it is, thankfully. I doubt there's a ton of cases where it
occurs, and I really hope there aren't any where the format string is
in a variable - I think I'd just curl up and cry in that case.
Unfortunately it's a weird situation - doctest expects a specific
output, so I need to coax IronPython to output that to get the tests
to pass.

- Jeff
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list