(self, value, fail_value=None)
return fail_value
return the first key of this dictionary given the value
return the first key of this dictionary given the value
return the first key of this dictionary given the value
def get_first_key_for_value(self, value, fail_value=None):
		"""return the first key of this dictionary given the value"""
		list_result = [item[0] for item in self.items() if item[1] == value]
		if len(list_result) > 0:
			return list_result[0]
		return fail_value
def get_first_key_for_value ( self , value , fail_value = None ) : list_result = [ item [ 0 ] for item in self . items ( ) if item [ 1 ] == value ] if len ( list_result ) > 0 : return list_result [ 0 ] return fail_value