Yuriy Taraday added the comment:

Can someone please point out why do we have to do that dance with recursion 
limit?

I've came upon this problem as well. I had some (bad) API I had to work with. 
It always raised the same exception with the only difference in the message. So 
I thought I could do something like this:

def message_contains(msg):
    class _MyExc(object):
        def __instancecheck__(self, exc):
            return msg in exc.args[0]
    return _MyExc

But after I tried it in number of different ways I found out that it's not 
possible.

So here's another reason to change this behavior.

----------
nosy: +yorik.sar

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12029>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to