def eq_msg(a, b, msg=None):
 assert (a == b), ((str(msg) or '') + (' (%r != %r)' % (a, b)))

def eq_msg ( a , b , msg = None ) : assert ( a == b ) , ( ( str ( msg ) or '' ) + ( ' (%r != %r)' % ( a , b ) ) )
shorthand for assert a == b .