[pypy-svn] r30875 - pypy/dist/pypy/lib/pyontology

ale at codespeak.net ale at codespeak.net
Wed Aug 2 09:59:10 CEST 2006


Author: ale
Date: Wed Aug  2 09:59:06 2006
New Revision: 30875

Modified:
   pypy/dist/pypy/lib/pyontology/constraint_classes.py
Log:
You have to check if values are different in order to fail a FunctionaProperty test

Modified: pypy/dist/pypy/lib/pyontology/constraint_classes.py
==============================================================================
--- pypy/dist/pypy/lib/pyontology/constraint_classes.py	(original)
+++ pypy/dist/pypy/lib/pyontology/constraint_classes.py	Wed Aug  2 09:59:06 2006
@@ -212,7 +212,10 @@
         domain_dict = Linkeddict(domain)
         for cls, val in domain_dict.items():
             if len(val) != 1:
-                raise ConsistencyFailure("FunctionalCardinality error")
+                for item in val:
+                    for otheritem in val:
+                        if (otheritem == item) == False: 
+                            raise ConsistencyFailure("FunctionalCardinality error")
         else:
             return 0
 



More information about the Pypy-commit mailing list