Ignore:
Timestamp:
13/03/12 13:32:01 (8 years ago)
Author:
mnagni
Message:

This new DB library adds better hash algorithm and a bug fix for the classes eq method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/ea_model/moles3_4/specimen/mo_specimenprocess.py

    r8091 r8160  
    2020 
    2121from ea_model.iso_19156_2011_observations_and_measurements.sampling_features.specimen.sf_process import  SF_Process  
    22 from ascore.utils import has_value 
     22from ascore.utils import has_value, collectionProofHash 
    2323 
    2424''' 
    25 Created on 16-Feb-2012 16:18:04 
     25Created on 13-Mar-2012 11:08:08 
    2626 
    2727@author: mnagni 
     
    5353 
    5454    def __eq__(self, y): 
     55        if type(self) != type(y): 
     56            return False 
    5557        ''' 
    5658        Cannot compare classes which do not define a "__key" attribute  
     
    6163 
    6264    def __hash__(self): 
    63         return hash(self.__key()) 
     65        return collectionProofHash(self.__key()) 
Note: See TracChangeset for help on using the changeset viewer.