def bestMatch( self, value ):
		# is value an instance of item or item.baseType?
		for typ in self:
			if isinstance(value,typ) or (
				hasattr( typ,'baseType') and
				isinstance(value, typ.baseType)
			):
				return typ
		# XXX should have meta-data on the types to allow better
		# recovery here
		return None
Find the closest item to value's type
dataset/ETHPy150Open correl/Transmission-XBMC/resources/lib/basictypes/typeunion.py/TypeUnion.bestMatch