[Jython-checkins] jython: Re-run gderived.py

jim.baker jython-checkins at python.org
Sat Jun 28 03:28:12 CEST 2014


http://hg.python.org/jython/rev/f177ef0ee272
changeset:   7323:f177ef0ee272
user:        Jim Baker <jim.baker at rackspace.com>
date:        Tue Jun 24 22:52:11 2014 -0600
summary:
  Re-run gderived.py

files:
  src/org/python/antlr/ast/AssertDerived.java                              |  16 +++------
  src/org/python/antlr/ast/AssignDerived.java                              |  16 +++------
  src/org/python/antlr/ast/AttributeDerived.java                           |  16 +++------
  src/org/python/antlr/ast/AugAssignDerived.java                           |  16 +++------
  src/org/python/antlr/ast/BinOpDerived.java                               |  16 +++------
  src/org/python/antlr/ast/BoolOpDerived.java                              |  16 +++------
  src/org/python/antlr/ast/BreakDerived.java                               |  16 +++------
  src/org/python/antlr/ast/CallDerived.java                                |  16 +++------
  src/org/python/antlr/ast/ClassDefDerived.java                            |  16 +++------
  src/org/python/antlr/ast/CompareDerived.java                             |  16 +++------
  src/org/python/antlr/ast/ContinueDerived.java                            |  16 +++------
  src/org/python/antlr/ast/DeleteDerived.java                              |  16 +++------
  src/org/python/antlr/ast/DictDerived.java                                |  16 +++------
  src/org/python/antlr/ast/EllipsisDerived.java                            |  16 +++------
  src/org/python/antlr/ast/ExceptHandlerDerived.java                       |  16 +++------
  src/org/python/antlr/ast/ExecDerived.java                                |  16 +++------
  src/org/python/antlr/ast/ExprDerived.java                                |  16 +++------
  src/org/python/antlr/ast/ExpressionDerived.java                          |  16 +++------
  src/org/python/antlr/ast/ExtSliceDerived.java                            |  16 +++------
  src/org/python/antlr/ast/ForDerived.java                                 |  16 +++------
  src/org/python/antlr/ast/FunctionDefDerived.java                         |  16 +++------
  src/org/python/antlr/ast/GeneratorExpDerived.java                        |  16 +++------
  src/org/python/antlr/ast/GlobalDerived.java                              |  16 +++------
  src/org/python/antlr/ast/IfDerived.java                                  |  16 +++------
  src/org/python/antlr/ast/IfExpDerived.java                               |  16 +++------
  src/org/python/antlr/ast/ImportDerived.java                              |  16 +++------
  src/org/python/antlr/ast/ImportFromDerived.java                          |  16 +++------
  src/org/python/antlr/ast/IndexDerived.java                               |  16 +++------
  src/org/python/antlr/ast/InteractiveDerived.java                         |  16 +++------
  src/org/python/antlr/ast/LambdaDerived.java                              |  16 +++------
  src/org/python/antlr/ast/ListCompDerived.java                            |  16 +++------
  src/org/python/antlr/ast/ListDerived.java                                |  16 +++------
  src/org/python/antlr/ast/ModuleDerived.java                              |  16 +++------
  src/org/python/antlr/ast/NameDerived.java                                |  16 +++------
  src/org/python/antlr/ast/NumDerived.java                                 |  16 +++------
  src/org/python/antlr/ast/PassDerived.java                                |  16 +++------
  src/org/python/antlr/ast/PrintDerived.java                               |  16 +++------
  src/org/python/antlr/ast/RaiseDerived.java                               |  16 +++------
  src/org/python/antlr/ast/ReprDerived.java                                |  16 +++------
  src/org/python/antlr/ast/ReturnDerived.java                              |  16 +++------
  src/org/python/antlr/ast/SliceDerived.java                               |  16 +++------
  src/org/python/antlr/ast/StrDerived.java                                 |  16 +++------
  src/org/python/antlr/ast/SubscriptDerived.java                           |  16 +++------
  src/org/python/antlr/ast/SuiteDerived.java                               |  16 +++------
  src/org/python/antlr/ast/TryExceptDerived.java                           |  16 +++------
  src/org/python/antlr/ast/TryFinallyDerived.java                          |  16 +++------
  src/org/python/antlr/ast/TupleDerived.java                               |  16 +++------
  src/org/python/antlr/ast/UnaryOpDerived.java                             |  16 +++------
  src/org/python/antlr/ast/WhileDerived.java                               |  16 +++------
  src/org/python/antlr/ast/WithDerived.java                                |  16 +++------
  src/org/python/antlr/ast/YieldDerived.java                               |  16 +++------
  src/org/python/antlr/ast/aliasDerived.java                               |  16 +++------
  src/org/python/antlr/ast/argumentsDerived.java                           |  16 +++------
  src/org/python/antlr/ast/comprehensionDerived.java                       |  16 +++------
  src/org/python/antlr/ast/keywordDerived.java                             |  16 +++------
  src/org/python/antlr/op/AddDerived.java                                  |  16 +++------
  src/org/python/antlr/op/AndDerived.java                                  |  16 +++------
  src/org/python/antlr/op/AugLoadDerived.java                              |  16 +++------
  src/org/python/antlr/op/AugStoreDerived.java                             |  16 +++------
  src/org/python/antlr/op/BitAndDerived.java                               |  16 +++------
  src/org/python/antlr/op/BitOrDerived.java                                |  16 +++------
  src/org/python/antlr/op/BitXorDerived.java                               |  16 +++------
  src/org/python/antlr/op/DelDerived.java                                  |  16 +++------
  src/org/python/antlr/op/DivDerived.java                                  |  16 +++------
  src/org/python/antlr/op/EqDerived.java                                   |  16 +++------
  src/org/python/antlr/op/FloorDivDerived.java                             |  16 +++------
  src/org/python/antlr/op/GtDerived.java                                   |  16 +++------
  src/org/python/antlr/op/GtEDerived.java                                  |  16 +++------
  src/org/python/antlr/op/InDerived.java                                   |  16 +++------
  src/org/python/antlr/op/InvertDerived.java                               |  16 +++------
  src/org/python/antlr/op/IsDerived.java                                   |  16 +++------
  src/org/python/antlr/op/IsNotDerived.java                                |  16 +++------
  src/org/python/antlr/op/LShiftDerived.java                               |  16 +++------
  src/org/python/antlr/op/LoadDerived.java                                 |  16 +++------
  src/org/python/antlr/op/LtDerived.java                                   |  16 +++------
  src/org/python/antlr/op/LtEDerived.java                                  |  16 +++------
  src/org/python/antlr/op/ModDerived.java                                  |  16 +++------
  src/org/python/antlr/op/MultDerived.java                                 |  16 +++------
  src/org/python/antlr/op/NotDerived.java                                  |  16 +++------
  src/org/python/antlr/op/NotEqDerived.java                                |  16 +++------
  src/org/python/antlr/op/NotInDerived.java                                |  16 +++------
  src/org/python/antlr/op/OrDerived.java                                   |  16 +++------
  src/org/python/antlr/op/ParamDerived.java                                |  16 +++------
  src/org/python/antlr/op/PowDerived.java                                  |  16 +++------
  src/org/python/antlr/op/RShiftDerived.java                               |  16 +++------
  src/org/python/antlr/op/StoreDerived.java                                |  16 +++------
  src/org/python/antlr/op/SubDerived.java                                  |  16 +++------
  src/org/python/antlr/op/UAddDerived.java                                 |  16 +++------
  src/org/python/antlr/op/USubDerived.java                                 |  16 +++------
  src/org/python/core/ClasspathPyImporterDerived.java                      |  16 +++------
  src/org/python/core/PyArrayDerived.java                                  |  16 +++------
  src/org/python/core/PyBaseExceptionDerived.java                          |  16 +++------
  src/org/python/core/PyByteArrayDerived.java                              |  16 +++------
  src/org/python/core/PyClassMethodDerived.java                            |  16 +++------
  src/org/python/core/PyComplexDerived.java                                |  16 +++------
  src/org/python/core/PyDictionaryDerived.java                             |  16 +++------
  src/org/python/core/PyEnumerateDerived.java                              |  16 +++------
  src/org/python/core/PyFileDerived.java                                   |  16 +++------
  src/org/python/core/PyFloatDerived.java                                  |  16 +++------
  src/org/python/core/PyFrozenSetDerived.java                              |  16 +++------
  src/org/python/core/PyIntegerDerived.java                                |  16 +++------
  src/org/python/core/PyListDerived.java                                   |  16 +++------
  src/org/python/core/PyLongDerived.java                                   |  16 +++------
  src/org/python/core/PyModuleDerived.java                                 |  16 +++------
  src/org/python/core/PyObjectDerived.java                                 |  16 +++------
  src/org/python/core/PyPropertyDerived.java                               |  16 +++------
  src/org/python/core/PySetDerived.java                                    |  16 +++------
  src/org/python/core/PyStringDerived.java                                 |  16 +++------
  src/org/python/core/PySuperDerived.java                                  |  16 +++------
  src/org/python/core/PyTupleDerived.java                                  |  16 +++------
  src/org/python/core/PyTypeDerived.java                                   |  16 +++------
  src/org/python/core/PyUnicodeDerived.java                                |  16 +++------
  src/org/python/modules/PyStructDerived.java                              |  16 +++------
  src/org/python/modules/_collections/PyDefaultDictDerived.java            |  16 +++------
  src/org/python/modules/_collections/PyDequeDerived.java                  |  16 +++------
  src/org/python/modules/_csv/PyDialectDerived.java                        |  16 +++------
  src/org/python/modules/_functools/PyPartialDerived.java                  |  16 +++------
  src/org/python/modules/_io/PyFileIODerived.java                          |  16 +++------
  src/org/python/modules/_io/PyIOBaseDerived.java                          |  16 +++------
  src/org/python/modules/_io/PyRawIOBaseDerived.java                       |  16 +++------
  src/org/python/modules/_weakref/ReferenceTypeDerived.java                |  16 +++------
  src/org/python/modules/bz2/PyBZ2CompressorDerived.java                   |  16 +++------
  src/org/python/modules/bz2/PyBZ2DecompressorDerived.java                 |  16 +++------
  src/org/python/modules/bz2/PyBZ2FileDerived.java                         |  16 +++------
  src/org/python/modules/itertools/PyTeeIteratorDerived.java               |  16 +++------
  src/org/python/modules/itertools/chainDerived.java                       |  16 +++------
  src/org/python/modules/itertools/combinationsDerived.java                |  16 +++------
  src/org/python/modules/itertools/combinationsWithReplacementDerived.java |  16 +++------
  src/org/python/modules/itertools/compressDerived.java                    |  16 +++------
  src/org/python/modules/itertools/countDerived.java                       |  16 +++------
  src/org/python/modules/itertools/cycleDerived.java                       |  16 +++------
  src/org/python/modules/itertools/dropwhileDerived.java                   |  16 +++------
  src/org/python/modules/itertools/groupbyDerived.java                     |  16 +++------
  src/org/python/modules/itertools/ifilterDerived.java                     |  16 +++------
  src/org/python/modules/itertools/ifilterfalseDerived.java                |  16 +++------
  src/org/python/modules/itertools/isliceDerived.java                      |  16 +++------
  src/org/python/modules/itertools/izipDerived.java                        |  16 +++------
  src/org/python/modules/itertools/izipLongestDerived.java                 |  16 +++------
  src/org/python/modules/itertools/permutationsDerived.java                |  16 +++------
  src/org/python/modules/itertools/productDerived.java                     |  16 +++------
  src/org/python/modules/itertools/repeatDerived.java                      |  16 +++------
  src/org/python/modules/itertools/starmapDerived.java                     |  16 +++------
  src/org/python/modules/itertools/takewhileDerived.java                   |  16 +++------
  src/org/python/modules/random/PyRandomDerived.java                       |  16 +++------
  src/org/python/modules/thread/PyLocalDerived.java                        |  16 +++------
  src/org/python/modules/zipimport/zipimporterDerived.java                 |  16 +++------
  146 files changed, 730 insertions(+), 1606 deletions(-)


diff --git a/src/org/python/antlr/ast/AssertDerived.java b/src/org/python/antlr/ast/AssertDerived.java
--- a/src/org/python/antlr/ast/AssertDerived.java
+++ b/src/org/python/antlr/ast/AssertDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/AssignDerived.java b/src/org/python/antlr/ast/AssignDerived.java
--- a/src/org/python/antlr/ast/AssignDerived.java
+++ b/src/org/python/antlr/ast/AssignDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/AttributeDerived.java b/src/org/python/antlr/ast/AttributeDerived.java
--- a/src/org/python/antlr/ast/AttributeDerived.java
+++ b/src/org/python/antlr/ast/AttributeDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/AugAssignDerived.java b/src/org/python/antlr/ast/AugAssignDerived.java
--- a/src/org/python/antlr/ast/AugAssignDerived.java
+++ b/src/org/python/antlr/ast/AugAssignDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/BinOpDerived.java b/src/org/python/antlr/ast/BinOpDerived.java
--- a/src/org/python/antlr/ast/BinOpDerived.java
+++ b/src/org/python/antlr/ast/BinOpDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/BoolOpDerived.java b/src/org/python/antlr/ast/BoolOpDerived.java
--- a/src/org/python/antlr/ast/BoolOpDerived.java
+++ b/src/org/python/antlr/ast/BoolOpDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/BreakDerived.java b/src/org/python/antlr/ast/BreakDerived.java
--- a/src/org/python/antlr/ast/BreakDerived.java
+++ b/src/org/python/antlr/ast/BreakDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/CallDerived.java b/src/org/python/antlr/ast/CallDerived.java
--- a/src/org/python/antlr/ast/CallDerived.java
+++ b/src/org/python/antlr/ast/CallDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ClassDefDerived.java b/src/org/python/antlr/ast/ClassDefDerived.java
--- a/src/org/python/antlr/ast/ClassDefDerived.java
+++ b/src/org/python/antlr/ast/ClassDefDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/CompareDerived.java b/src/org/python/antlr/ast/CompareDerived.java
--- a/src/org/python/antlr/ast/CompareDerived.java
+++ b/src/org/python/antlr/ast/CompareDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ContinueDerived.java b/src/org/python/antlr/ast/ContinueDerived.java
--- a/src/org/python/antlr/ast/ContinueDerived.java
+++ b/src/org/python/antlr/ast/ContinueDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/DeleteDerived.java b/src/org/python/antlr/ast/DeleteDerived.java
--- a/src/org/python/antlr/ast/DeleteDerived.java
+++ b/src/org/python/antlr/ast/DeleteDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/DictDerived.java b/src/org/python/antlr/ast/DictDerived.java
--- a/src/org/python/antlr/ast/DictDerived.java
+++ b/src/org/python/antlr/ast/DictDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/EllipsisDerived.java b/src/org/python/antlr/ast/EllipsisDerived.java
--- a/src/org/python/antlr/ast/EllipsisDerived.java
+++ b/src/org/python/antlr/ast/EllipsisDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ExceptHandlerDerived.java b/src/org/python/antlr/ast/ExceptHandlerDerived.java
--- a/src/org/python/antlr/ast/ExceptHandlerDerived.java
+++ b/src/org/python/antlr/ast/ExceptHandlerDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ExecDerived.java b/src/org/python/antlr/ast/ExecDerived.java
--- a/src/org/python/antlr/ast/ExecDerived.java
+++ b/src/org/python/antlr/ast/ExecDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ExprDerived.java b/src/org/python/antlr/ast/ExprDerived.java
--- a/src/org/python/antlr/ast/ExprDerived.java
+++ b/src/org/python/antlr/ast/ExprDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ExpressionDerived.java b/src/org/python/antlr/ast/ExpressionDerived.java
--- a/src/org/python/antlr/ast/ExpressionDerived.java
+++ b/src/org/python/antlr/ast/ExpressionDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ExtSliceDerived.java b/src/org/python/antlr/ast/ExtSliceDerived.java
--- a/src/org/python/antlr/ast/ExtSliceDerived.java
+++ b/src/org/python/antlr/ast/ExtSliceDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ForDerived.java b/src/org/python/antlr/ast/ForDerived.java
--- a/src/org/python/antlr/ast/ForDerived.java
+++ b/src/org/python/antlr/ast/ForDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/FunctionDefDerived.java b/src/org/python/antlr/ast/FunctionDefDerived.java
--- a/src/org/python/antlr/ast/FunctionDefDerived.java
+++ b/src/org/python/antlr/ast/FunctionDefDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/GeneratorExpDerived.java b/src/org/python/antlr/ast/GeneratorExpDerived.java
--- a/src/org/python/antlr/ast/GeneratorExpDerived.java
+++ b/src/org/python/antlr/ast/GeneratorExpDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/GlobalDerived.java b/src/org/python/antlr/ast/GlobalDerived.java
--- a/src/org/python/antlr/ast/GlobalDerived.java
+++ b/src/org/python/antlr/ast/GlobalDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/IfDerived.java b/src/org/python/antlr/ast/IfDerived.java
--- a/src/org/python/antlr/ast/IfDerived.java
+++ b/src/org/python/antlr/ast/IfDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/IfExpDerived.java b/src/org/python/antlr/ast/IfExpDerived.java
--- a/src/org/python/antlr/ast/IfExpDerived.java
+++ b/src/org/python/antlr/ast/IfExpDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ImportDerived.java b/src/org/python/antlr/ast/ImportDerived.java
--- a/src/org/python/antlr/ast/ImportDerived.java
+++ b/src/org/python/antlr/ast/ImportDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ImportFromDerived.java b/src/org/python/antlr/ast/ImportFromDerived.java
--- a/src/org/python/antlr/ast/ImportFromDerived.java
+++ b/src/org/python/antlr/ast/ImportFromDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/IndexDerived.java b/src/org/python/antlr/ast/IndexDerived.java
--- a/src/org/python/antlr/ast/IndexDerived.java
+++ b/src/org/python/antlr/ast/IndexDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/InteractiveDerived.java b/src/org/python/antlr/ast/InteractiveDerived.java
--- a/src/org/python/antlr/ast/InteractiveDerived.java
+++ b/src/org/python/antlr/ast/InteractiveDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/LambdaDerived.java b/src/org/python/antlr/ast/LambdaDerived.java
--- a/src/org/python/antlr/ast/LambdaDerived.java
+++ b/src/org/python/antlr/ast/LambdaDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ListCompDerived.java b/src/org/python/antlr/ast/ListCompDerived.java
--- a/src/org/python/antlr/ast/ListCompDerived.java
+++ b/src/org/python/antlr/ast/ListCompDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ListDerived.java b/src/org/python/antlr/ast/ListDerived.java
--- a/src/org/python/antlr/ast/ListDerived.java
+++ b/src/org/python/antlr/ast/ListDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ModuleDerived.java b/src/org/python/antlr/ast/ModuleDerived.java
--- a/src/org/python/antlr/ast/ModuleDerived.java
+++ b/src/org/python/antlr/ast/ModuleDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/NameDerived.java b/src/org/python/antlr/ast/NameDerived.java
--- a/src/org/python/antlr/ast/NameDerived.java
+++ b/src/org/python/antlr/ast/NameDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/NumDerived.java b/src/org/python/antlr/ast/NumDerived.java
--- a/src/org/python/antlr/ast/NumDerived.java
+++ b/src/org/python/antlr/ast/NumDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/PassDerived.java b/src/org/python/antlr/ast/PassDerived.java
--- a/src/org/python/antlr/ast/PassDerived.java
+++ b/src/org/python/antlr/ast/PassDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/PrintDerived.java b/src/org/python/antlr/ast/PrintDerived.java
--- a/src/org/python/antlr/ast/PrintDerived.java
+++ b/src/org/python/antlr/ast/PrintDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/RaiseDerived.java b/src/org/python/antlr/ast/RaiseDerived.java
--- a/src/org/python/antlr/ast/RaiseDerived.java
+++ b/src/org/python/antlr/ast/RaiseDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ReprDerived.java b/src/org/python/antlr/ast/ReprDerived.java
--- a/src/org/python/antlr/ast/ReprDerived.java
+++ b/src/org/python/antlr/ast/ReprDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/ReturnDerived.java b/src/org/python/antlr/ast/ReturnDerived.java
--- a/src/org/python/antlr/ast/ReturnDerived.java
+++ b/src/org/python/antlr/ast/ReturnDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/SliceDerived.java b/src/org/python/antlr/ast/SliceDerived.java
--- a/src/org/python/antlr/ast/SliceDerived.java
+++ b/src/org/python/antlr/ast/SliceDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/StrDerived.java b/src/org/python/antlr/ast/StrDerived.java
--- a/src/org/python/antlr/ast/StrDerived.java
+++ b/src/org/python/antlr/ast/StrDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/SubscriptDerived.java b/src/org/python/antlr/ast/SubscriptDerived.java
--- a/src/org/python/antlr/ast/SubscriptDerived.java
+++ b/src/org/python/antlr/ast/SubscriptDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/SuiteDerived.java b/src/org/python/antlr/ast/SuiteDerived.java
--- a/src/org/python/antlr/ast/SuiteDerived.java
+++ b/src/org/python/antlr/ast/SuiteDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/TryExceptDerived.java b/src/org/python/antlr/ast/TryExceptDerived.java
--- a/src/org/python/antlr/ast/TryExceptDerived.java
+++ b/src/org/python/antlr/ast/TryExceptDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/TryFinallyDerived.java b/src/org/python/antlr/ast/TryFinallyDerived.java
--- a/src/org/python/antlr/ast/TryFinallyDerived.java
+++ b/src/org/python/antlr/ast/TryFinallyDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/TupleDerived.java b/src/org/python/antlr/ast/TupleDerived.java
--- a/src/org/python/antlr/ast/TupleDerived.java
+++ b/src/org/python/antlr/ast/TupleDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/UnaryOpDerived.java b/src/org/python/antlr/ast/UnaryOpDerived.java
--- a/src/org/python/antlr/ast/UnaryOpDerived.java
+++ b/src/org/python/antlr/ast/UnaryOpDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/WhileDerived.java b/src/org/python/antlr/ast/WhileDerived.java
--- a/src/org/python/antlr/ast/WhileDerived.java
+++ b/src/org/python/antlr/ast/WhileDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/WithDerived.java b/src/org/python/antlr/ast/WithDerived.java
--- a/src/org/python/antlr/ast/WithDerived.java
+++ b/src/org/python/antlr/ast/WithDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/YieldDerived.java b/src/org/python/antlr/ast/YieldDerived.java
--- a/src/org/python/antlr/ast/YieldDerived.java
+++ b/src/org/python/antlr/ast/YieldDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/aliasDerived.java b/src/org/python/antlr/ast/aliasDerived.java
--- a/src/org/python/antlr/ast/aliasDerived.java
+++ b/src/org/python/antlr/ast/aliasDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/argumentsDerived.java b/src/org/python/antlr/ast/argumentsDerived.java
--- a/src/org/python/antlr/ast/argumentsDerived.java
+++ b/src/org/python/antlr/ast/argumentsDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/comprehensionDerived.java b/src/org/python/antlr/ast/comprehensionDerived.java
--- a/src/org/python/antlr/ast/comprehensionDerived.java
+++ b/src/org/python/antlr/ast/comprehensionDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/ast/keywordDerived.java b/src/org/python/antlr/ast/keywordDerived.java
--- a/src/org/python/antlr/ast/keywordDerived.java
+++ b/src/org/python/antlr/ast/keywordDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/AddDerived.java b/src/org/python/antlr/op/AddDerived.java
--- a/src/org/python/antlr/op/AddDerived.java
+++ b/src/org/python/antlr/op/AddDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/AndDerived.java b/src/org/python/antlr/op/AndDerived.java
--- a/src/org/python/antlr/op/AndDerived.java
+++ b/src/org/python/antlr/op/AndDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/AugLoadDerived.java b/src/org/python/antlr/op/AugLoadDerived.java
--- a/src/org/python/antlr/op/AugLoadDerived.java
+++ b/src/org/python/antlr/op/AugLoadDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/AugStoreDerived.java b/src/org/python/antlr/op/AugStoreDerived.java
--- a/src/org/python/antlr/op/AugStoreDerived.java
+++ b/src/org/python/antlr/op/AugStoreDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/BitAndDerived.java b/src/org/python/antlr/op/BitAndDerived.java
--- a/src/org/python/antlr/op/BitAndDerived.java
+++ b/src/org/python/antlr/op/BitAndDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/BitOrDerived.java b/src/org/python/antlr/op/BitOrDerived.java
--- a/src/org/python/antlr/op/BitOrDerived.java
+++ b/src/org/python/antlr/op/BitOrDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/BitXorDerived.java b/src/org/python/antlr/op/BitXorDerived.java
--- a/src/org/python/antlr/op/BitXorDerived.java
+++ b/src/org/python/antlr/op/BitXorDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/DelDerived.java b/src/org/python/antlr/op/DelDerived.java
--- a/src/org/python/antlr/op/DelDerived.java
+++ b/src/org/python/antlr/op/DelDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/DivDerived.java b/src/org/python/antlr/op/DivDerived.java
--- a/src/org/python/antlr/op/DivDerived.java
+++ b/src/org/python/antlr/op/DivDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/EqDerived.java b/src/org/python/antlr/op/EqDerived.java
--- a/src/org/python/antlr/op/EqDerived.java
+++ b/src/org/python/antlr/op/EqDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/FloorDivDerived.java b/src/org/python/antlr/op/FloorDivDerived.java
--- a/src/org/python/antlr/op/FloorDivDerived.java
+++ b/src/org/python/antlr/op/FloorDivDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/GtDerived.java b/src/org/python/antlr/op/GtDerived.java
--- a/src/org/python/antlr/op/GtDerived.java
+++ b/src/org/python/antlr/op/GtDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/GtEDerived.java b/src/org/python/antlr/op/GtEDerived.java
--- a/src/org/python/antlr/op/GtEDerived.java
+++ b/src/org/python/antlr/op/GtEDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/InDerived.java b/src/org/python/antlr/op/InDerived.java
--- a/src/org/python/antlr/op/InDerived.java
+++ b/src/org/python/antlr/op/InDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/InvertDerived.java b/src/org/python/antlr/op/InvertDerived.java
--- a/src/org/python/antlr/op/InvertDerived.java
+++ b/src/org/python/antlr/op/InvertDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/IsDerived.java b/src/org/python/antlr/op/IsDerived.java
--- a/src/org/python/antlr/op/IsDerived.java
+++ b/src/org/python/antlr/op/IsDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/IsNotDerived.java b/src/org/python/antlr/op/IsNotDerived.java
--- a/src/org/python/antlr/op/IsNotDerived.java
+++ b/src/org/python/antlr/op/IsNotDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/LShiftDerived.java b/src/org/python/antlr/op/LShiftDerived.java
--- a/src/org/python/antlr/op/LShiftDerived.java
+++ b/src/org/python/antlr/op/LShiftDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/LoadDerived.java b/src/org/python/antlr/op/LoadDerived.java
--- a/src/org/python/antlr/op/LoadDerived.java
+++ b/src/org/python/antlr/op/LoadDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/LtDerived.java b/src/org/python/antlr/op/LtDerived.java
--- a/src/org/python/antlr/op/LtDerived.java
+++ b/src/org/python/antlr/op/LtDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/LtEDerived.java b/src/org/python/antlr/op/LtEDerived.java
--- a/src/org/python/antlr/op/LtEDerived.java
+++ b/src/org/python/antlr/op/LtEDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/ModDerived.java b/src/org/python/antlr/op/ModDerived.java
--- a/src/org/python/antlr/op/ModDerived.java
+++ b/src/org/python/antlr/op/ModDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/MultDerived.java b/src/org/python/antlr/op/MultDerived.java
--- a/src/org/python/antlr/op/MultDerived.java
+++ b/src/org/python/antlr/op/MultDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/NotDerived.java b/src/org/python/antlr/op/NotDerived.java
--- a/src/org/python/antlr/op/NotDerived.java
+++ b/src/org/python/antlr/op/NotDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/NotEqDerived.java b/src/org/python/antlr/op/NotEqDerived.java
--- a/src/org/python/antlr/op/NotEqDerived.java
+++ b/src/org/python/antlr/op/NotEqDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/NotInDerived.java b/src/org/python/antlr/op/NotInDerived.java
--- a/src/org/python/antlr/op/NotInDerived.java
+++ b/src/org/python/antlr/op/NotInDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/OrDerived.java b/src/org/python/antlr/op/OrDerived.java
--- a/src/org/python/antlr/op/OrDerived.java
+++ b/src/org/python/antlr/op/OrDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/ParamDerived.java b/src/org/python/antlr/op/ParamDerived.java
--- a/src/org/python/antlr/op/ParamDerived.java
+++ b/src/org/python/antlr/op/ParamDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/PowDerived.java b/src/org/python/antlr/op/PowDerived.java
--- a/src/org/python/antlr/op/PowDerived.java
+++ b/src/org/python/antlr/op/PowDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/RShiftDerived.java b/src/org/python/antlr/op/RShiftDerived.java
--- a/src/org/python/antlr/op/RShiftDerived.java
+++ b/src/org/python/antlr/op/RShiftDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/StoreDerived.java b/src/org/python/antlr/op/StoreDerived.java
--- a/src/org/python/antlr/op/StoreDerived.java
+++ b/src/org/python/antlr/op/StoreDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/SubDerived.java b/src/org/python/antlr/op/SubDerived.java
--- a/src/org/python/antlr/op/SubDerived.java
+++ b/src/org/python/antlr/op/SubDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/UAddDerived.java b/src/org/python/antlr/op/UAddDerived.java
--- a/src/org/python/antlr/op/UAddDerived.java
+++ b/src/org/python/antlr/op/UAddDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/antlr/op/USubDerived.java b/src/org/python/antlr/op/USubDerived.java
--- a/src/org/python/antlr/op/USubDerived.java
+++ b/src/org/python/antlr/op/USubDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/ClasspathPyImporterDerived.java b/src/org/python/core/ClasspathPyImporterDerived.java
--- a/src/org/python/core/ClasspathPyImporterDerived.java
+++ b/src/org/python/core/ClasspathPyImporterDerived.java
@@ -961,18 +961,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyArrayDerived.java b/src/org/python/core/PyArrayDerived.java
--- a/src/org/python/core/PyArrayDerived.java
+++ b/src/org/python/core/PyArrayDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyBaseExceptionDerived.java b/src/org/python/core/PyBaseExceptionDerived.java
--- a/src/org/python/core/PyBaseExceptionDerived.java
+++ b/src/org/python/core/PyBaseExceptionDerived.java
@@ -961,18 +961,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyByteArrayDerived.java b/src/org/python/core/PyByteArrayDerived.java
--- a/src/org/python/core/PyByteArrayDerived.java
+++ b/src/org/python/core/PyByteArrayDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyClassMethodDerived.java b/src/org/python/core/PyClassMethodDerived.java
--- a/src/org/python/core/PyClassMethodDerived.java
+++ b/src/org/python/core/PyClassMethodDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyComplexDerived.java b/src/org/python/core/PyComplexDerived.java
--- a/src/org/python/core/PyComplexDerived.java
+++ b/src/org/python/core/PyComplexDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyDictionaryDerived.java b/src/org/python/core/PyDictionaryDerived.java
--- a/src/org/python/core/PyDictionaryDerived.java
+++ b/src/org/python/core/PyDictionaryDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyEnumerateDerived.java b/src/org/python/core/PyEnumerateDerived.java
--- a/src/org/python/core/PyEnumerateDerived.java
+++ b/src/org/python/core/PyEnumerateDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyFileDerived.java b/src/org/python/core/PyFileDerived.java
--- a/src/org/python/core/PyFileDerived.java
+++ b/src/org/python/core/PyFileDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyFloatDerived.java b/src/org/python/core/PyFloatDerived.java
--- a/src/org/python/core/PyFloatDerived.java
+++ b/src/org/python/core/PyFloatDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyFrozenSetDerived.java b/src/org/python/core/PyFrozenSetDerived.java
--- a/src/org/python/core/PyFrozenSetDerived.java
+++ b/src/org/python/core/PyFrozenSetDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyIntegerDerived.java b/src/org/python/core/PyIntegerDerived.java
--- a/src/org/python/core/PyIntegerDerived.java
+++ b/src/org/python/core/PyIntegerDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyListDerived.java b/src/org/python/core/PyListDerived.java
--- a/src/org/python/core/PyListDerived.java
+++ b/src/org/python/core/PyListDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyLongDerived.java b/src/org/python/core/PyLongDerived.java
--- a/src/org/python/core/PyLongDerived.java
+++ b/src/org/python/core/PyLongDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyModuleDerived.java b/src/org/python/core/PyModuleDerived.java
--- a/src/org/python/core/PyModuleDerived.java
+++ b/src/org/python/core/PyModuleDerived.java
@@ -961,18 +961,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyObjectDerived.java b/src/org/python/core/PyObjectDerived.java
--- a/src/org/python/core/PyObjectDerived.java
+++ b/src/org/python/core/PyObjectDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyPropertyDerived.java b/src/org/python/core/PyPropertyDerived.java
--- a/src/org/python/core/PyPropertyDerived.java
+++ b/src/org/python/core/PyPropertyDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PySetDerived.java b/src/org/python/core/PySetDerived.java
--- a/src/org/python/core/PySetDerived.java
+++ b/src/org/python/core/PySetDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyStringDerived.java b/src/org/python/core/PyStringDerived.java
--- a/src/org/python/core/PyStringDerived.java
+++ b/src/org/python/core/PyStringDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PySuperDerived.java b/src/org/python/core/PySuperDerived.java
--- a/src/org/python/core/PySuperDerived.java
+++ b/src/org/python/core/PySuperDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyTupleDerived.java b/src/org/python/core/PyTupleDerived.java
--- a/src/org/python/core/PyTupleDerived.java
+++ b/src/org/python/core/PyTupleDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyTypeDerived.java b/src/org/python/core/PyTypeDerived.java
--- a/src/org/python/core/PyTypeDerived.java
+++ b/src/org/python/core/PyTypeDerived.java
@@ -961,18 +961,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/core/PyUnicodeDerived.java b/src/org/python/core/PyUnicodeDerived.java
--- a/src/org/python/core/PyUnicodeDerived.java
+++ b/src/org/python/core/PyUnicodeDerived.java
@@ -985,18 +985,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/PyStructDerived.java b/src/org/python/modules/PyStructDerived.java
--- a/src/org/python/modules/PyStructDerived.java
+++ b/src/org/python/modules/PyStructDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_collections/PyDefaultDictDerived.java b/src/org/python/modules/_collections/PyDefaultDictDerived.java
--- a/src/org/python/modules/_collections/PyDefaultDictDerived.java
+++ b/src/org/python/modules/_collections/PyDefaultDictDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_collections/PyDequeDerived.java b/src/org/python/modules/_collections/PyDequeDerived.java
--- a/src/org/python/modules/_collections/PyDequeDerived.java
+++ b/src/org/python/modules/_collections/PyDequeDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_csv/PyDialectDerived.java b/src/org/python/modules/_csv/PyDialectDerived.java
--- a/src/org/python/modules/_csv/PyDialectDerived.java
+++ b/src/org/python/modules/_csv/PyDialectDerived.java
@@ -962,18 +962,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_functools/PyPartialDerived.java b/src/org/python/modules/_functools/PyPartialDerived.java
--- a/src/org/python/modules/_functools/PyPartialDerived.java
+++ b/src/org/python/modules/_functools/PyPartialDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_io/PyFileIODerived.java b/src/org/python/modules/_io/PyFileIODerived.java
--- a/src/org/python/modules/_io/PyFileIODerived.java
+++ b/src/org/python/modules/_io/PyFileIODerived.java
@@ -962,18 +962,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_io/PyIOBaseDerived.java b/src/org/python/modules/_io/PyIOBaseDerived.java
--- a/src/org/python/modules/_io/PyIOBaseDerived.java
+++ b/src/org/python/modules/_io/PyIOBaseDerived.java
@@ -962,18 +962,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_io/PyRawIOBaseDerived.java b/src/org/python/modules/_io/PyRawIOBaseDerived.java
--- a/src/org/python/modules/_io/PyRawIOBaseDerived.java
+++ b/src/org/python/modules/_io/PyRawIOBaseDerived.java
@@ -962,18 +962,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/_weakref/ReferenceTypeDerived.java b/src/org/python/modules/_weakref/ReferenceTypeDerived.java
--- a/src/org/python/modules/_weakref/ReferenceTypeDerived.java
+++ b/src/org/python/modules/_weakref/ReferenceTypeDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/bz2/PyBZ2CompressorDerived.java b/src/org/python/modules/bz2/PyBZ2CompressorDerived.java
--- a/src/org/python/modules/bz2/PyBZ2CompressorDerived.java
+++ b/src/org/python/modules/bz2/PyBZ2CompressorDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/bz2/PyBZ2DecompressorDerived.java b/src/org/python/modules/bz2/PyBZ2DecompressorDerived.java
--- a/src/org/python/modules/bz2/PyBZ2DecompressorDerived.java
+++ b/src/org/python/modules/bz2/PyBZ2DecompressorDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/bz2/PyBZ2FileDerived.java b/src/org/python/modules/bz2/PyBZ2FileDerived.java
--- a/src/org/python/modules/bz2/PyBZ2FileDerived.java
+++ b/src/org/python/modules/bz2/PyBZ2FileDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/PyTeeIteratorDerived.java b/src/org/python/modules/itertools/PyTeeIteratorDerived.java
--- a/src/org/python/modules/itertools/PyTeeIteratorDerived.java
+++ b/src/org/python/modules/itertools/PyTeeIteratorDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/chainDerived.java b/src/org/python/modules/itertools/chainDerived.java
--- a/src/org/python/modules/itertools/chainDerived.java
+++ b/src/org/python/modules/itertools/chainDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/combinationsDerived.java b/src/org/python/modules/itertools/combinationsDerived.java
--- a/src/org/python/modules/itertools/combinationsDerived.java
+++ b/src/org/python/modules/itertools/combinationsDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/combinationsWithReplacementDerived.java b/src/org/python/modules/itertools/combinationsWithReplacementDerived.java
--- a/src/org/python/modules/itertools/combinationsWithReplacementDerived.java
+++ b/src/org/python/modules/itertools/combinationsWithReplacementDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/compressDerived.java b/src/org/python/modules/itertools/compressDerived.java
--- a/src/org/python/modules/itertools/compressDerived.java
+++ b/src/org/python/modules/itertools/compressDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/countDerived.java b/src/org/python/modules/itertools/countDerived.java
--- a/src/org/python/modules/itertools/countDerived.java
+++ b/src/org/python/modules/itertools/countDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/cycleDerived.java b/src/org/python/modules/itertools/cycleDerived.java
--- a/src/org/python/modules/itertools/cycleDerived.java
+++ b/src/org/python/modules/itertools/cycleDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/dropwhileDerived.java b/src/org/python/modules/itertools/dropwhileDerived.java
--- a/src/org/python/modules/itertools/dropwhileDerived.java
+++ b/src/org/python/modules/itertools/dropwhileDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/groupbyDerived.java b/src/org/python/modules/itertools/groupbyDerived.java
--- a/src/org/python/modules/itertools/groupbyDerived.java
+++ b/src/org/python/modules/itertools/groupbyDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/ifilterDerived.java b/src/org/python/modules/itertools/ifilterDerived.java
--- a/src/org/python/modules/itertools/ifilterDerived.java
+++ b/src/org/python/modules/itertools/ifilterDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/ifilterfalseDerived.java b/src/org/python/modules/itertools/ifilterfalseDerived.java
--- a/src/org/python/modules/itertools/ifilterfalseDerived.java
+++ b/src/org/python/modules/itertools/ifilterfalseDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/isliceDerived.java b/src/org/python/modules/itertools/isliceDerived.java
--- a/src/org/python/modules/itertools/isliceDerived.java
+++ b/src/org/python/modules/itertools/isliceDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/izipDerived.java b/src/org/python/modules/itertools/izipDerived.java
--- a/src/org/python/modules/itertools/izipDerived.java
+++ b/src/org/python/modules/itertools/izipDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/izipLongestDerived.java b/src/org/python/modules/itertools/izipLongestDerived.java
--- a/src/org/python/modules/itertools/izipLongestDerived.java
+++ b/src/org/python/modules/itertools/izipLongestDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/permutationsDerived.java b/src/org/python/modules/itertools/permutationsDerived.java
--- a/src/org/python/modules/itertools/permutationsDerived.java
+++ b/src/org/python/modules/itertools/permutationsDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/productDerived.java b/src/org/python/modules/itertools/productDerived.java
--- a/src/org/python/modules/itertools/productDerived.java
+++ b/src/org/python/modules/itertools/productDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/repeatDerived.java b/src/org/python/modules/itertools/repeatDerived.java
--- a/src/org/python/modules/itertools/repeatDerived.java
+++ b/src/org/python/modules/itertools/repeatDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/starmapDerived.java b/src/org/python/modules/itertools/starmapDerived.java
--- a/src/org/python/modules/itertools/starmapDerived.java
+++ b/src/org/python/modules/itertools/starmapDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/itertools/takewhileDerived.java b/src/org/python/modules/itertools/takewhileDerived.java
--- a/src/org/python/modules/itertools/takewhileDerived.java
+++ b/src/org/python/modules/itertools/takewhileDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/random/PyRandomDerived.java b/src/org/python/modules/random/PyRandomDerived.java
--- a/src/org/python/modules/random/PyRandomDerived.java
+++ b/src/org/python/modules/random/PyRandomDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/thread/PyLocalDerived.java b/src/org/python/modules/thread/PyLocalDerived.java
--- a/src/org/python/modules/thread/PyLocalDerived.java
+++ b/src/org/python/modules/thread/PyLocalDerived.java
@@ -962,18 +962,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {
diff --git a/src/org/python/modules/zipimport/zipimporterDerived.java b/src/org/python/modules/zipimport/zipimporterDerived.java
--- a/src/org/python/modules/zipimport/zipimporterDerived.java
+++ b/src/org/python/modules/zipimport/zipimporterDerived.java
@@ -986,18 +986,12 @@
     }
 
     public PyObject __call__(PyObject args[],String keywords[]) {
-        ThreadState ts=Py.getThreadState();
-        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
-            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
-        try {
-            PyType self_type=getType();
-            PyObject impl=self_type.lookup("__call__");
-            if (impl!=null)
-                return impl.__get__(this,self_type).__call__(args,keywords);
-            return super.__call__(args,keywords);
-        } finally {
-            --ts.recursion_depth;
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__call__");
+        if (impl!=null) {
+            return impl.__get__(this,self_type).__call__(args,keywords);
         }
+        return super.__call__(args,keywords);
     }
 
     public PyObject __findattr_ex__(String name) {

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list