Updating generic.py error message

This is my first attempt at a PR. I just made a little change to allow an error message. Would appreciate some feedback. 
Based on https://github.com/pydata/pandas/issues/8015
see https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertRaisesRegexp for the signature
the string and the callable (`k`) should be switched