Fix proxy objects to respect !=

This commit is contained in:
Andrew Godwin 2013-05-19 12:27:17 +02:00
parent 38a8cf1cdc
commit d58c98d73c
1 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,11 @@ def lazy(func, *resultclasses):
else:
return func(*self.__args, **self.__kw)
def __ne__(self, other):
if isinstance(other, Promise):
other = other.__cast()
return self.__cast() != other
def __eq__(self, other):
if isinstance(other, Promise):
other = other.__cast()