Skip to content

Commit

Permalink
chore: remove last case of linear search in container
Browse files Browse the repository at this point in the history
  • Loading branch information
KristianJensen committed May 23, 2016
1 parent e92cb4a commit fda094c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optlang/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def __len__(self):
def __contains__(self, item):
if item in self._dict:
return True
elif hasattr(item, "name") and item in self._object_list:
return True
elif hasattr(item, "name") and item.name in self._dict:
return item is self._dict[item.name]
return False

def __iter__(self):
Expand Down

0 comments on commit fda094c

Please sign in to comment.