#NEWLINE# def _parse_filter_arg( self , arg ) : #NEWLINE# #INDENT# '\n        Parses a filter arg in the format:\n        <colname>__<op>\n        :returns: colname, op tuple\n        ' #NEWLINE# statement = arg . rsplit ( '__' , 1 ) #NEWLINE# if ( len ( statement ) == 1 ) : #NEWLINE# #INDENT# return ( arg , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( statement ) == 2 ) : #NEWLINE# #INDENT# return ( statement [ 0 ] , statement [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise QueryException ( "Can't parse '{0}'" . format ( arg ) )