mailr17656 - /trunk/generic_fns/mol_res_spin.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 02, 2012 - 11:47:
Author: bugman
Date: Tue Oct  2 11:47:15 2012
New Revision: 17656

URL: http://svn.gna.org/viewcvs/relax?rev=17656&view=rev
Log:
Automatically converted the generic_fns.mol_res_spin module to support both 
Python 2 and 3.

The command used was:
2to3 -w generic_fns/mol_res_spin.py


Modified:
    trunk/generic_fns/mol_res_spin.py

Modified: trunk/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/mol_res_spin.py?rev=17656&r1=17655&r2=17656&view=diff
==============================================================================
--- trunk/generic_fns/mol_res_spin.py (original)
+++ trunk/generic_fns/mol_res_spin.py Tue Oct  2 11:47:15 2012
@@ -1974,7 +1974,7 @@
                         spin._spin_ids.pop(spin._spin_ids.index(spin_id))
 
                     # Remove the IDs from the look up table.
-                    if dp.mol._spin_id_lookup.has_key(spin_id):
+                    if spin_id in dp.mol._spin_id_lookup:
                         dp.mol._spin_id_lookup.pop(spin_id)
 
 
@@ -2647,7 +2647,7 @@
     dp = pipes.get_pipe(pipe)
 
     # No spin ID, so assume there is no spin.
-    if not dp.mol._spin_id_lookup.has_key(spin_id):
+    if spin_id not in dp.mol._spin_id_lookup:
         return None
 
     # The indices from the look up table.
@@ -2813,7 +2813,7 @@
     dp = pipes.get_pipe(pipe)
 
     # No spin ID, so switch to selection matching.
-    if not dp.mol._spin_id_lookup.has_key(spin_id):
+    if spin_id not in dp.mol._spin_id_lookup:
         # Parse the selection string.
         select_obj = Selection(spin_id)
 




Related Messages


Powered by MHonArc, Updated Tue Oct 02 12:00:01 2012