This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author oconnor663
Recipients georg.brandl, gvanrossum, larry, ncoghlan, oconnor663, pitrou, serhiy.storchaka, vstinner, yselivanov
Date 2015-12-02.18:59:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449082748.3.0.500422092472.issue25782@psf.upfronthosting.co.za>
In-reply-to
Content
Yury, do we need to handle more complicated infinite loops, where "self" doesn't actually show up in the loop? Here's an example:

    try:
        raise Exception
    except Exception as ex:
        loop1 = Exception()
        loop2 = Exception()
        loop1.__context__ = loop2
        loop2.__context__ = loop1
        ex.__context__ = loop1
        hasattr(1, 'aa')

I'm unfamiliar with CPython, so I don't know whether full-blown loop detection belongs here. Maybe we could add a hardcoded limit like "fail if we loop more than X times"?
History
Date User Action Args
2015-12-02 18:59:08oconnor663setrecipients: + oconnor663, gvanrossum, georg.brandl, ncoghlan, pitrou, vstinner, larry, serhiy.storchaka, yselivanov
2015-12-02 18:59:08oconnor663setmessageid: <1449082748.3.0.500422092472.issue25782@psf.upfronthosting.co.za>
2015-12-02 18:59:08oconnor663linkissue25782 messages
2015-12-02 18:59:08oconnor663create