Abend with cls.__repr__ = cls.__str__ on Windows.

Terry Reedy tjreedy at udel.edu
Thu Mar 17 22:00:30 EDT 2011


On 3/17/2011 8:24 PM, J Peyret wrote:
> This gives a particularly nasty abend in Windows - "Python.exe has
> stopped working", rather than a regular exception stack error.  I've
> fixed it, after I figured out the cause, which took a while, but maybe
> someone will benefit from this.
>
> Python 2.6.5 on Windows 7.
>
> class Foo(object):
>      pass
>
> Foo.__repr__ = Foo.__str__   # this will cause an abend.

2.7.1 and 3.2.0 on winxp, no problem, interactive intepreter or IDLE 
shell. Upgrade?


-- 
Terry Jan Reedy




More information about the Python-list mailing list