mailr25638 - /trunk/lib/periodic_table.py


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

Header


Content

Posted by edward on September 04, 2014 - 16:49:
Author: bugman
Date: Thu Sep  4 16:49:29 2014
New Revision: 25638

URL: http://svn.gna.org/viewcvs/relax?rev=25638&view=rev
Log:
Ported r25637 from the 3.3.0 tag.

The command used was:
svn merge -r25636:25637 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/tags/3.3.0 .

.....
  Python 3 fix for the lib.periodic_table module.
  
  The Python string module does not exist in Python 3.
.....


Modified:
    trunk/lib/periodic_table.py

Modified: trunk/lib/periodic_table.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/periodic_table.py?rev=25638&r1=25637&r2=25638&view=diff
==============================================================================
--- trunk/lib/periodic_table.py (original)
+++ trunk/lib/periodic_table.py Thu Sep  4 16:49:29 2014
@@ -34,7 +34,6 @@
 # Python module imports.
 from numpy import array, average, float64
 from re import search, split
-from string import lower, upper
 
 # relax module imports.
 from lib.errors import RelaxError
@@ -95,9 +94,9 @@
     """
 
     # The format is uppercase first letter, lowercase second.
-    new_symbol = upper(symbol[0])
+    new_symbol = symbol[0].upper()
     if len(symbol) == 2:
-        new_symbol += lower(symbol[1])
+        new_symbol += symbol[1].lower()
 
     # Return the corrected atomic symbol.
     return new_symbol




Related Messages


Powered by MHonArc, Updated Thu Sep 04 17:00:02 2014