Message 277519 - Python tracker (original) (raw)

Serhiy's patch looks good to me. It would be nice to add a test for multiple invalid keyword arguments:

with self.assertRaisesRegex(TypeError, msg):
    ImportError('test', invalid='keyword', another=True)

Using empty_tuple seems reasonable to me. Brett and Eric, what do you think?