#NEWLINE# def _hastypes( self , expr , types ) : #NEWLINE# #INDENT# 'Check if ``expr`` is any of ``types``. ' #NEWLINE# _types = [ cls . __name__ for cls in expr . __class__ . mro ( ) ] #NEWLINE# return bool ( set ( _types ) . intersection ( types ) )