Serhiy Storchaka added the comment: I would change __context__ setter to check if it creates a loop. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue25782> _______________________________________