#NEWLINE# def HasMoreSpecificPatternThan( self , other_handler ) : #NEWLINE# #INDENT# 'Returns True if self is more specific than other_handler.\n\n    Priority in determining specificity is first determined by literal-ness,\n    second by length. This is according to the Java servlet spec for\n    mapping URL paths.\n\n    Args:\n      other_handler: another handler to compare against.\n\n    Returns:\n      True if self.pattern is a literal and other_handler.pattern is not,\n      False if vice versa, and otherwise True if self.pattern is longer.\n    ' #NEWLINE# if ( self . is_literal != other_handler . is_literal ) : #NEWLINE# #INDENT# return self . is_literal #NEWLINE# #UNINDENT# return ( len ( self . pattern ) > len ( other_handler . pattern ) )