[Python-Dev] Dict suppressing exceptions

"Martin v. Löwis" martin at v.loewis.de
Fri Aug 11 21:08:51 CEST 2006


Michael Chermside schrieb:
> I don't *strongly* object to this consensus, but if you haven't
> glanced at my original example, take a look - it might convince you.
> The proposed solution will not help with my example.

I ignored your example the first time because it was too complicated
to understand.

Now I looked at it, and think that the recipe is broken. It should
add an __eq__ method which is

  def __eq__(self, other):
      return type(self) is type(other) \
             and self.EnumType is other.EnumType \
             and self.__value==other.__value)

Regards,
Martin


More information about the Python-Dev mailing list