Simplifed argument parsing in object.__format__, added test case.
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index be6f391..c5bb54a 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -558,6 +558,10 @@
         # TypeError because self.__format__ returns the wrong type
         self.assertRaises(TypeError, format, B(), "")
 
+        # TypeError because format_spec is not unicode
+        self.assertRaises(TypeError, format, object(), 4)
+        self.assertRaises(TypeError, format, object(), object())
+
         # make sure we can take a subclass of str as a format spec
         self.assertEqual(format(0, C('10')), '         0')