Removed exception
authorMike Jackson <michaelj@epcc.ed.ac.uk>
Tue, 2 Apr 2013 15:59:35 +0000 (08:59 -0700)
committerW. Trevor King <wking@tremily.us>
Fri, 1 Nov 2013 04:21:09 +0000 (21:21 -0700)
testing/dna.py

index a0fc0ecf45da6e10a8a9aaed06057ce2d1bb383b..4cf4f0e365d82e802ff0e2395ea2e4ae8b7e8119 100755 (executable)
@@ -9,9 +9,6 @@ def calculate_weight(sequence):
     @return molecular weight.
     """
     weight = 0.0
-    try:
-        for ch in sequence:
-            weight += NUCLEOTIDES[ch]
-        return weight
-    except TypeError:
-        print 'The input is not a sequence e.g. a string or list'
+    for ch in sequence:
+        weight += NUCLEOTIDES[ch]
+    return weight