[kernel] r14491 - people/waldi/utils/kconfigeditor2/lib/kconfigeditor/kconfig

Bastian Blank waldi at alioth.debian.org
Thu Oct 29 10:35:48 UTC 2009


Author: waldi
Date: Thu Oct 29 10:35:46 2009
New Revision: 14491

Log:
lib/kconfigeditor/kconfig/config.py: Make file entries hashable.

Modified:
   people/waldi/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py

Modified: people/waldi/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py
==============================================================================
--- people/waldi/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py	Thu Oct 29 09:54:49 2009	(r14490)
+++ people/waldi/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py	Thu Oct 29 10:35:46 2009	(r14491)
@@ -161,6 +161,12 @@
             return ret
         return cmp(self.value, other.value)
 
+    def __hash__(self):
+        return hash(self.name) | hash(self.value)
+
+    def __repr__(self):
+        return '<%s(%r, %r, %r)>' % (self.__class__.__name__, self.name, self.value, self.comments)
+
     def __str__(self):
         return "CONFIG_%s=%s" % (self.name, self.value)
 



More information about the Kernel-svn-changes mailing list