Serhiy Storchaka added the comment: The patch LGTM. I doubt about the exception type. May be RuntimeError is more appropriate? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8865> _______________________________________