Serhiy Storchaka added the comment: Yet one nitpick. Perhaps _write_object() should raise TypeError instead of InvalidFileException. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue14455> _______________________________________