diff options
author | Pauli Virtanen <pav@iki.fi> | 2010-02-20 18:05:41 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-02-20 18:05:41 +0000 |
commit | 87cf71e97cc256fb6e86c921c0c5d6c54a037910 (patch) | |
tree | 76d1c362dbf20dc6b8a2c1324ea07fe7fbd4a474 /numpy/compat | |
parent | 69ba79ac12c615102cd1a6b8947d3ad736f6e936 (diff) | |
download | numpy-87cf71e97cc256fb6e86c921c0c5d6c54a037910.tar.gz |
3K: BUG: core: fix some tests for Py3
Diffstat (limited to 'numpy/compat')
-rw-r--r-- | numpy/compat/py3k.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |