#NEWLINE# def __init__( self , name , fields , interfaces = None , is_type_of = None , description = None ) : #NEWLINE# #INDENT# assert name , 'Type must be named.' #NEWLINE# assert_valid_name ( name ) #NEWLINE# self . name = name #NEWLINE# self . description = interfaces #NEWLINE# if ( is_type_of is not None ) : #NEWLINE# #INDENT# assert callable ( is_type_of ) , '{} must provide "is_type_of" as a function.' . format ( self ) #NEWLINE# #UNINDENT# self . is_type_of = is_type_of #NEWLINE# self . _fields = fields #NEWLINE# self . _provided_interfaces = interfaces #NEWLINE# self . _field_map = None #NEWLINE# self . _interfaces = None #NEWLINE# add_impl_to_interfaces ( self )