def strip_trailing_semicolon(query):
 s = _SEMICOLON_WHITESPACE.split(query, 2)
 if (len(s) > 1):
  assert (len(s) == 2)
  assert (s[1] == '')
 return s[0]

def strip_trailing_semicolon ( query ) : s = _SEMICOLON_WHITESPACE . split ( query , 2 ) if ( len ( s ) > 1 ) : assert ( len ( s ) == 2 ) assert ( s [ 1 ] == '' ) return s [ 0 ]
as a convenience .