diff --git a/zipline/protocol.py b/zipline/protocol.py index ec052721..34462b0a 100644 --- a/zipline/protocol.py +++ b/zipline/protocol.py @@ -144,6 +144,13 @@ class BarData(object): else: return name in self.__dict__ + def has_key(self, name): + """ + DEPRECATED: __contains__ is preferred, but this method is for + compatibility with existing algorithms. + """ + return name in self + def __setitem__(self, name, value): self._data[name] = value