[Scipy-svn] r6869 - trunk/scipy/io/matlab

scipy-svn@scip... scipy-svn@scip...
Thu Nov 11 18:57:03 CST 2010


Author: matthew.brett@gmail.com
Date: 2010-11-11 18:57:02 -0600 (Thu, 11 Nov 2010)
New Revision: 6869

Modified:
   trunk/scipy/io/matlab/mio.py
Log:
RF - learned kwargs.pop trick from Paulis git-cherry-tree code

Modified: trunk/scipy/io/matlab/mio.py
===================================================================
--- trunk/scipy/io/matlab/mio.py	2010-11-12 00:56:57 UTC (rev 6868)
+++ trunk/scipy/io/matlab/mio.py	2010-11-12 00:57:02 UTC (rev 6869)
@@ -144,11 +144,7 @@
     files.  Because scipy does not supply one, we do not implement the
     HDF5 / 7.3 interface here.
     '''
-    if 'variable_names' in kwargs:
-        variable_names = kwargs['variable_names']
-        del kwargs['variable_names']
-    else:
-        variable_names = None
+    variable_names = kwargs.pop('variable_names', None)
     MR = mat_reader_factory(file_name, appendmat, **kwargs)
     matfile_dict = MR.get_variables(variable_names)
     if mdict is not None:



More information about the Scipy-svn mailing list