From a20719c8e3a021a7a0f2d27c7b61e8eae5779600 Mon Sep 17 00:00:00 2001 From: Greg Brockman Date: Mon, 9 May 2016 18:34:44 -0700 Subject: [PATCH] Revert "Feature/len (#68)" This reverts commit 705d0249931d5ec65e8dc80d468c9febd57a1589. --- gym/spaces/discrete.py | 2 -- gym/spaces/tuple_space.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/gym/spaces/discrete.py b/gym/spaces/discrete.py index e0b4cfd89..f3b3fa372 100644 --- a/gym/spaces/discrete.py +++ b/gym/spaces/discrete.py @@ -21,5 +21,3 @@ class Discrete(Space): return "Discrete(%d)" % self.n def __eq__(self, other): return self.n == other.n - def __len__(self): - return n diff --git a/gym/spaces/tuple_space.py b/gym/spaces/tuple_space.py index 03ef73189..e0f392878 100644 --- a/gym/spaces/tuple_space.py +++ b/gym/spaces/tuple_space.py @@ -7,9 +7,6 @@ class Tuple(Space): def __init__(self, spaces): self.spaces = spaces - def __len__(self): - return len(self.spaces) - def sample(self): return tuple([space.sample() for space in self.spaces])