From a7227b449936b4018b4c2e801003c3153d79059c Mon Sep 17 00:00:00 2001 From: Renata Hodovan Date: Thu, 8 Dec 2016 10:36:12 +0100 Subject: [PATCH] Fix AttributeError when trying to write an immutable variable in Python. The `removeOne` function of IntervalSet tries to directly rewrite the start field of an immutable range variable when splitting an existing interval. This causes AttributeError which is fixed by the patch. --- runtime/Python2/src/antlr4/IntervalSet.py | 2 +- runtime/Python3/src/antlr4/IntervalSet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/Python2/src/antlr4/IntervalSet.py b/runtime/Python2/src/antlr4/IntervalSet.py index c4c93749e..bef5d4807 100644 --- a/runtime/Python2/src/antlr4/IntervalSet.py +++ b/runtime/Python2/src/antlr4/IntervalSet.py @@ -158,7 +158,7 @@ class IntervalSet(object): # split existing range elif v