rm unnecessary __contains__ duplicate code (#1147)

`contains` really should not exist when it does exactly what the builtin
magic method `__contains__` was meant for, but that would break backward
compatibility.
This commit is contained in:
Alok Singh
2018-08-28 10:51:28 -07:00
committed by pzhokhov
parent 750063055f
commit 6332d4f113
7 changed files with 3 additions and 13 deletions

View File

@@ -20,8 +20,6 @@ class Tuple(gym.Space):
return isinstance(x, tuple) and len(x) == len(self.spaces) and all(
space.contains(part) for (space,part) in zip(self.spaces,x))
__contains__ = contains
def __repr__(self):
return "Tuple(" + ", ". join([str(s) for s in self.spaces]) + ")"