#NEWLINE# def __call__( self , semantic_value = None , **kwargs ) : #NEWLINE# #INDENT# 'A shortcut allowing us to instantiate a new type from an attribute.' #NEWLINE# result = semantic_value #NEWLINE# if ( semantic_value is None ) : #NEWLINE# #INDENT# result = self . attribute_type ( ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isinstance ( semantic_value , self . attribute_type ) ) : #NEWLINE# #INDENT# result = self . attribute_type ( semantic_value , ** kwargs ) #NEWLINE# #UNINDENT# #UNINDENT# if getattr ( semantic_value , 'attribute_instance' , None ) : #NEWLINE# #INDENT# result = result . Copy ( ) #NEWLINE# #UNINDENT# result . attribute_instance = self #NEWLINE# return result