[Numpy-svn] r8172 - trunk/numpy/compat

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:15:20 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:15:20 -0600 (Sat, 20 Feb 2010)
New Revision: 8172

Modified:
   trunk/numpy/compat/py3k.py
Log:
3K: compat: make isfileobj recognize only real file objects with FILE* pointers as file objects

Modified: trunk/numpy/compat/py3k.py
===================================================================
--- trunk/numpy/compat/py3k.py	2010-02-20 18:15:06 UTC (rev 8171)
+++ trunk/numpy/compat/py3k.py	2010-02-20 18:15:20 UTC (rev 8172)
@@ -18,7 +18,7 @@
             return s
         return s.encode('iso-8859-1')
     def isfileobj(f):
-        return isinstance(f, io.IOBase)
+        return isinstance(f, io.FileIO)
     strchar = 'U'
 else:
     bytes = str



More information about the Numpy-svn mailing list