From 87cf71e97cc256fb6e86c921c0c5d6c54a037910 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 20 Feb 2010 18:05:41 +0000 Subject: 3K: BUG: core: fix some tests for Py3 --- numpy/compat/py3k.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'numpy/compat') diff --git a/numpy/compat/py3k.py b/numpy/compat/py3k.py index a75bfebfd..931044787 100644 --- a/numpy/compat/py3k.py +++ b/numpy/compat/py3k.py @@ -3,7 +3,7 @@ Python 3 compatibility tools. """ -__all__ = ['bytes', 'asbytes', 'isfileobj', 'getexception'] +__all__ = ['bytes', 'asbytes', 'isfileobj', 'getexception', 'strchar'] import sys @@ -16,9 +16,11 @@ if sys.version_info[0] >= 3: return s.encode('iso-8859-1') def isfileobj(f): return isinstance(f, io.IOBase) + strchar = 'U' else: bytes = str asbytes = str + strchar = 'S' def isfileobj(f): return isinstance(f, file) -- cgit v1.2.1