#NEWLINE# def __init__( self , v ) : #NEWLINE# #INDENT# if isinstance ( v , solr_date ) : #NEWLINE# #INDENT# self . _dt_obj = v . _dt_obj #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( self , basestring ) : #NEWLINE# #INDENT# self . _dt_obj = datetime_from_w3_datestring ( v ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if hasattr ( v , 'strftime' ) : #NEWLINE# #INDENT# self . _dt_obj = self . from_date ( v ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise scorched . exc . SolrError ( ( 'Cannot initialize solr_date from %s object' % type ( v ) ) )