diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-26 20:04:59 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-02-26 20:04:59 -0700 |
commit | 705bf928e1256a06019c75ee945370fbe89cdde7 (patch) | |
tree | 3e1d8ebcef67a93d8d5eeb63db1256406ae5c49f /numpy/f2py/tests/test_array_from_pyobj.py | |
parent | 17774a6d58b889b6b7a25d6af5b66f2148d47f41 (diff) | |
download | numpy-705bf928e1256a06019c75ee945370fbe89cdde7.tar.gz |
2to3: Use modern exception syntax.
Example: except ValueError,msg: -> except ValueError as msg:
Diffstat (limited to 'numpy/f2py/tests/test_array_from_pyobj.py')
-rw-r--r-- | numpy/f2py/tests/test_array_from_pyobj.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py index be85a308a..c1b927c1c 100644 --- a/numpy/f2py/tests/test_array_from_pyobj.py +++ b/numpy/f2py/tests/test_array_from_pyobj.py @@ -297,7 +297,7 @@ class _test_shared_memory: try: a = self.array([2],intent.in_.inout,self.num2seq) - except TypeError,msg: + except TypeError as msg: if not str(msg).startswith('failed to initialize intent(inout|inplace|cache) array'): raise else: @@ -313,7 +313,7 @@ class _test_shared_memory: shape = (len(self.num23seq),len(self.num23seq[0])) try: a = self.array(shape,intent.in_.inout,obj) - except ValueError,msg: + except ValueError as msg: if not str(msg).startswith('failed to initialize intent(inout) array'): raise else: @@ -398,7 +398,7 @@ class _test_shared_memory: try: a = self.array(shape,intent.in_.cache,obj[::-1]) - except ValueError,msg: + except ValueError as msg: if not str(msg).startswith('failed to initialize intent(cache) array'): raise else: @@ -411,7 +411,7 @@ class _test_shared_memory: shape = (len(self.num2seq),) try: a = self.array(shape,intent.in_.cache,obj) - except ValueError,msg: + except ValueError as msg: if not str(msg).startswith('failed to initialize intent(cache) array'): raise else: @@ -429,7 +429,7 @@ class _test_shared_memory: shape = (-1,3) try: a = self.array(shape,intent.cache.hide,None) - except ValueError,msg: + except ValueError as msg: if not str(msg).startswith('failed to create intent(cache|hide)|optional array'): raise else: @@ -456,7 +456,7 @@ class _test_shared_memory: shape = (-1,3) try: a = self.array(shape,intent.hide,None) - except ValueError,msg: + except ValueError as msg: if not str(msg).startswith('failed to create intent(cache|hide)|optional array'): raise else: |