From 617e50e6b553e8760bc1e8277578baa1e8e6c7a3 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 20 Jan 2013 08:08:15 +0100 Subject: [PATCH] move exception class into shadow function as we may not want to export it under the cython.* namespace at this point --- Cython/Shadow.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Cython/Shadow.py b/Cython/Shadow.py index c6f8018..5ee857b 100644 --- a/Cython/Shadow.py +++ b/Cython/Shadow.py @@ -28,10 +28,6 @@ class _ArrayType(object): return "%s[%s]" % (self.dtype, ", ".join(axes)) -class InvalidTypeSpecification(Exception): - pass - - def index_type(base_type, item): """ Support array type creation by slicing, e.g. double[:, :] specifies @@ -40,6 +36,9 @@ def index_type(base_type, item): """ assert isinstance(item, (tuple, slice)) + class InvalidTypeSpecification(Exception): + pass + def verify_slice(s): if s.start or s.stop or s.step not in (None, 1): raise InvalidTypeSpecification( -- 2.7.4