Index: scripts/Python/python-extensions.swig
===================================================================
--- scripts/Python/python-extensions.swig	(revision 165177)
+++ scripts/Python/python-extensions.swig	(working copy)
@@ -539,13 +539,15 @@
         # Allow array access if this value has children...
         if type(key) is int:
             return value(self.sbvalue.GetValueForExpressionPath("[%i]" % key))
-        raise TypeError
+        if type(key) is value:
+            return value(self.sbvalue.GetValueForExpressionPath("[%i]" % int(key))
+        raise TypeError("No array item of type %s" % str(type(key)))
 
     def __getattr__(self, name):
         child_sbvalue = self.sbvalue.GetChildMemberWithName (name)
         if child_sbvalue:
             return value(child_sbvalue)
-        raise AttributeError
+        raise AttributeError("Attribute '%s' is not defined" % name)
 
     def __add__(self, other):
         return int(self) + int(other)
@@ -690,7 +692,13 @@
         return '0x%x' % self.sbvalue.GetValueAsUnsigned()
 
     def __eq__(self, other):
-        return self.sbvalue.GetValueAsUnsigned() == self.sbvalue.GetValueAsUnsigned()
+        if type(other) is int:
+            return int(self) == other
+        elif type(other) is str:
+            return str(self) == other
+        elif type(other) is value:
+            return self.sbvalue.GetValueAsUnsigned() == other.sbvalue.GetValueAsUnsigned()
+        raise TypeError("Unknown type %s, No equality operation defined." % str(type(other)))
                                                                     
     def __neq__(self, other):
         return not self.__eq__(other)
 
