From 108854f98610a1e1e3f632a6bbbbb69687e15f86 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Tue, 1 Jan 2019 13:19:38 +0100 Subject: [PATCH] remove misleading API --- runtime/Python2/src/antlr4/IntervalSet.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/runtime/Python2/src/antlr4/IntervalSet.py b/runtime/Python2/src/antlr4/IntervalSet.py index addc82ef9..73f43b6c6 100644 --- a/runtime/Python2/src/antlr4/IntervalSet.py +++ b/runtime/Python2/src/antlr4/IntervalSet.py @@ -24,12 +24,6 @@ class Interval(object): def __iter__(self): return iter(self.range) - def __getitem__(self, idx): - if idx == 0: - return self.start - elif idx == 1: - return self.stop - raise IndexError('Interval index out or range [{}]'.format(idx)) class IntervalSet(object):