def _isSubdomainOf(descendantName, ancestorName):
 descendantLabels = _nameToLabels(descendantName.lower())
 ancestorLabels = _nameToLabels(ancestorName.lower())
 return (descendantLabels[(- len(ancestorLabels)):] == ancestorLabels)

def _isSubdomainOf ( descendantName , ancestorName ) : descendantLabels = _nameToLabels ( descendantName . lower ( ) ) ancestorLabels = _nameToLabels ( ancestorName . lower ( ) ) return ( descendantLabels [ ( - len ( ancestorLabels ) ) : ] == ancestorLabels )
test whether c{descendantname} is equal to or is a i{subdomain} of c{ancestorname} .