[issue5882] __repr__ is ignored when formatting exceptions

2009-04-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: And Exception implements __str__, so it is called. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker

[issue5882] __repr__ is ignored when formatting exceptions

2009-04-29 Thread Jonathan Ellis
Changes by Jonathan Ellis : -- versions: +Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5882] __repr__ is ignored when formatting exceptions

2009-04-29 Thread Jonathan Ellis
New submission from Jonathan Ellis : The docs say that "If a class defines __repr__() but not __str__(), then __repr__() is also used when an “informal” string representation of instances of that class is required." but, repr is ignored: >>> class E(Exception): ... def __repr__(self): ...