[IronPython] Bug in Django's lazy functions

Jeff Hardy jdhardy at gmail.com
Mon Dec 29 20:35:24 CET 2008

On Mon, Dec 29, 2008 at 9:43 AM, Curt Hagenlocher <curt at hagenlocher.org> wrote:
> This specific error seems to come down to the fact that IronPython
> implements str.__cmp__ while CPython apparently does not.
> ...
> What happens is that IronPython ends up calling str.__cmp__, which correctly
> reports that its argument isn't a string.  CPython apparently calls
> object.__cmp__ (or something masquerading as it) which is much less picky.
>  It seems to me that this code is overly sensitive to something that should
> be an implementation detail, but we'd obviously like to provide a way to
> work around it.  Please add this to CodePlex.

Will do. Nice detective work!

> There may also be a problem as a result of str == unicode; in fact, there's
> a commented-out assertion in line 175 of functional.py that specifically
> breaks because this is true.

functional.py isn't *exactly* the same as Django's - I commented that
line out. It does actually have a purpose when str != unicode. There's
code that hits CP #20366 as well.

- Jeff

More information about the Ironpython-users mailing list