From ef115bdf521eca01b07fafce98883f53340b9673 Mon Sep 17 00:00:00 2001 From: Chris Ham Date: Sat, 17 Dec 2016 15:23:20 -0500 Subject: [PATCH 1/2] closes GH14554, RecursionError nolonger coerced into a KeyError or IndexError --- doc/source/whatsnew/v0.19.2.txt | 1 + pandas/core/indexing.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.19.2.txt b/doc/source/whatsnew/v0.19.2.txt index ecbd6e9b3b288..755da989d0018 100644 --- a/doc/source/whatsnew/v0.19.2.txt +++ b/doc/source/whatsnew/v0.19.2.txt @@ -64,3 +64,4 @@ Bug Fixes - Explicit check in ``to_stata`` and ``StataWriter`` for out-of-range values when writing doubles (:issue:`14618`) +- Bug in indexing causing RecursionError to be coerced into a KeyError or IndexError. (:issue:`14554`) diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index 660e8c9446202..957cbacf46523 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -848,7 +848,7 @@ def _multi_take(self, tup): [(a, self._convert_for_reindex(t, axis=o._get_axis_number(a))) for t, a in zip(tup, o._AXIS_ORDERS)]) return o.reindex(**d) - except: + except(KeyError, IndexError): raise self._exception def _convert_for_reindex(self, key, axis=0): From 1844b83dda34019e2696c353b834ebc18c0b14ef Mon Sep 17 00:00:00 2001 From: Chris Ham Date: Sat, 17 Dec 2016 19:35:28 -0500 Subject: [PATCH 2/2] quick edit for force a change --- doc/source/whatsnew/v0.19.2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.19.2.txt b/doc/source/whatsnew/v0.19.2.txt index 755da989d0018..ae6ded165761b 100644 --- a/doc/source/whatsnew/v0.19.2.txt +++ b/doc/source/whatsnew/v0.19.2.txt @@ -64,4 +64,4 @@ Bug Fixes - Explicit check in ``to_stata`` and ``StataWriter`` for out-of-range values when writing doubles (:issue:`14618`) -- Bug in indexing causing RecursionError to be coerced into a KeyError or IndexError. (:issue:`14554`) +- Bug in indexing caused RecursionError to be coerced into a KeyError or IndexError. (:issue:`14554`)