[Numpy-svn] r8207 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 20:48:33 CST 2010


Author: ptvirtan
Date: 2010-02-20 20:48:33 -0600 (Sat, 20 Feb 2010)
New Revision: 8207

Modified:
   trunk/numpy/lib/_iotools.py
   trunk/numpy/lib/io.py
Log:
3K: lib: missing_values in genfromtxt is never a basestring on Py3

Modified: trunk/numpy/lib/_iotools.py
===================================================================
--- trunk/numpy/lib/_iotools.py	2010-02-21 02:48:19 UTC (rev 8206)
+++ trunk/numpy/lib/_iotools.py	2010-02-21 02:48:33 UTC (rev 8207)
@@ -600,7 +600,7 @@
         if missing_values is None:
             self.missing_values = set([asbytes('')])
         else:
-            if isinstance(missing_values, basestring):
+            if isinstance(missing_values, bytes):
                 missing_values = missing_values.split(asbytes(","))
             self.missing_values = set(list(missing_values) + [asbytes('')])
         #

Modified: trunk/numpy/lib/io.py
===================================================================
--- trunk/numpy/lib/io.py	2010-02-21 02:48:19 UTC (rev 8206)
+++ trunk/numpy/lib/io.py	2010-02-21 02:48:33 UTC (rev 8207)
@@ -1209,7 +1209,7 @@
             if value not in entry:
                 entry.append(value)
     # We have a string : apply it to all entries
-    elif isinstance(user_missing_values, basestring):
+    elif isinstance(user_missing_values, bytes):
         user_value = user_missing_values.split(asbytes(","))
         for entry in missing_values:
             entry.extend(user_value)



More information about the Numpy-svn mailing list