#NEWLINE# @ classmethod #NEWLINE# def from_representation( cls , s ) : #NEWLINE# #INDENT# if ( not ( '=' in s ) ) : #NEWLINE# #INDENT# raise ValueError ( 's should be of the form name=module:function' ) #NEWLINE# #UNINDENT# ( name , value ) = [ j . strip ( ) for j in s . split ( '=' ) ] #NEWLINE# if ( not ( ':' in name ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'string representation should be of the form module:function, not %s' % value ) ) #NEWLINE# #UNINDENT# ( module , function ) = value . split ( ':' , 1 ) #NEWLINE# return cls ( name , module , function )