#NEWLINE# def get_by_datetime_or_date( dict_ , dateTimeOrDate ) : #NEWLINE# #INDENT# ret = dict_ . get ( dateTimeOrDate , [ ] ) #NEWLINE# if ( ( len ( ret ) == 0 ) and isinstance ( dateTimeOrDate , datetime . datetime ) ) : #NEWLINE# #INDENT# ret = dict_ . get ( dateTimeOrDate . date ( ) , [ ] ) #NEWLINE# #UNINDENT# return ret