Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Fix operator __ne__
Browse files Browse the repository at this point in the history
__ne__ was defined as != which means it would just recurse calling
itself.
  • Loading branch information
gladhorn committed Dec 11, 2014
1 parent f5fdb83 commit dcfe18a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def test_list_item():
l_item2 = deserialize(container.ListItem(), b)
assert l_item == l_item2

l_item3 = container.ListItem()
assert l_item != l_item3


def test_map_item():
m_item = container.MapItem()
Expand Down
2 changes: 1 addition & 1 deletion thriftpy/thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __hash__(self):
return super(TPayload, self).__hash__()

def __ne__(self, other):
return self != other
return not self.__eq__(other)

This comment has been minimized.

Copy link
@hit9

hit9 Jan 13, 2015

Contributor

.. Dead loop



class TClient(object):
Expand Down

0 comments on commit dcfe18a

Please sign in to comment.