Andreas Stührk <andy-pyt...@hammerhartes.de> added the comment: Actually, Python behaves the way you expect it. The problem is that when that exception is created, Python tries to look up the involved class names. To do that, it tries to get the "__class__" attribute (hapens in `getinstclassname()`, which will call again into A's `__getattibute__`, which will raise again, and for that new exception, "__class__" will be looked up, which will call into `__getattribute__` again, which will raise again and that goes on and on until finally the recursion limit is hit and a recursion error is raised. That recursion error will be discarded by `getinstclassname()`. Hence it's not really a hangup, it just takes a lot of time due to the recursive calls. Try your example with a recursion limit set to a really small value to see the expected behaviour.
---------- nosy: +Trundle _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9744> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com