def eq_(result, expected, msg=None):
 params = {'expected': expected, 'result': result}
 aka = ('\n\n--------------------------------- aka -----------------------------------------\n\nExpected:\n%(expected)r\n\nGot:\n%(result)r\n' % params)
 default_msg = ('\nExpected:\n%(expected)s\n\nGot:\n%(result)s\n' % params)
 if ((repr(result) != str(result)) or (repr(expected) != str(expected))):
  default_msg += aka
 assert (result == expected), (msg or default_msg)

def eq_ ( result , expected , msg = None ) : params = { 'expected' : expected , 'result' : result } aka = ( '\n\n--------------------------------- aka -----------------------------------------\n\nExpected:\n%(expected)r\n\nGot:\n%(result)r\n' % params ) default_msg = ( '\nExpected:\n%(expected)s\n\nGot:\n%(result)s\n' % params ) if ( ( repr ( result ) != str ( result ) ) or ( repr ( expected ) != str ( expected ) ) ) : default_msg += aka assert ( result == expected ) , ( msg or default_msg )
shorthand for assert a == b .