Author: bugman
Date: Tue Nov 11 16:37:13 2014
New Revision: 26531
URL: http://svn.gna.org/viewcvs/relax?rev=26531&view=rev
Log:
Python 3 fixes via 2to3 - the filter() function in Python 3 now returns an
iterator.
The command used was:
2to3 -j 4 -w -f filter .
Modified:
trunk/lib/sequence.py
trunk/specific_analyses/relax_disp/model.py
Modified: trunk/lib/sequence.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/sequence.py?rev=26531&r1=26530&r2=26531&view=diff
==============================================================================
--- trunk/lib/sequence.py (original)
+++ trunk/lib/sequence.py Tue Nov 11 16:37:13 2014
@@ -84,7 +84,7 @@
raise RelaxError("If the 'spin_id_col' argument has been supplied,
then the mol_name_col, res_name_col, res_num_col, spin_name_col, and
spin_num_col must all be set to None.")
# Minimum number of columns.
- min_col_num = max(filter(None, [spin_id_col, mol_name_col, res_num_col,
res_name_col, spin_num_col, spin_name_col, data_col, error_col]))
+ min_col_num = max([_f for _f in [spin_id_col, mol_name_col, res_num_col,
res_name_col, spin_num_col, spin_name_col, data_col, error_col] if _f])
# Extract the data from the file.
if not file_data:
Modified: trunk/specific_analyses/relax_disp/model.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/model.py?rev=26531&r1=26530&r2=26531&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/model.py (original)
+++ trunk/specific_analyses/relax_disp/model.py Tue Nov 11 16:37:13 2014
@@ -78,7 +78,7 @@
if nest_list == None:
self.nest_list = nest_list
else:
- nest_list = filter(partial(ne, self.model), nest_list)
+ nest_list = list(filter(partial(ne, self.model), nest_list))
self.nest_list = nest_list
# Define the order of how exp type ranks.
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits