mailr25637 - /tags/3.3.0/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:46:
Author: bugman
Date: Thu Sep  4 16:46:42 2014
New Revision: 25637

URL: http://svn.gna.org/viewcvs/relax?rev=25637&view=rev
Log:
Python 3 fix for the lib.periodic_table module.

The Python string module does not exist in Python 3.


Modified:
    tags/3.3.0/lib/periodic_table.py

Modified: tags/3.3.0/lib/periodic_table.py
URL: 
http://svn.gna.org/viewcvs/relax/tags/3.3.0/lib/periodic_table.py?rev=25637&r1=25636&r2=25637&view=diff
==============================================================================
--- tags/3.3.0/lib/periodic_table.py    (original)
+++ tags/3.3.0/lib/periodic_table.py    Thu Sep  4 16:46:42 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