From 8237d2e33cadc8199349e1b19c9d9d3bdda77de7 Mon Sep 17 00:00:00 2001 From: erick Date: Sun, 25 Oct 2009 01:17:32 +0000 Subject: Merge branch 'master' of git://git.sugarlabs.org/tutorius/mainline into tutorialADT --- (limited to 'tutorius/properties.py') diff --git a/tutorius/properties.py b/tutorius/properties.py index 78e3c2b..cbb2ae3 100644 --- a/tutorius/properties.py +++ b/tutorius/properties.py @@ -104,7 +104,7 @@ class TPropContainer(object): return hash(tuple(map(tuple,sorted(self._props.items(), cmp=lambda x, y: cmp(x[0], y[0]))))) def __eq__(self, e2): - return self._props == e2._props + return isinstance(e2, type(self)) and self._props == e2._props # Adding methods for pickling and unpickling an object with # properties -- cgit v0.9.1