Armin Rigo added the comment: The patch is missing Py_DECREF(name). Also, I'd raise TypeError instead of ValueError, just like function calls do in a similar situation. __________________________________ Tracker <report at bugs.python.org> <http://bugs.python.org/issue1831> __________________________________