From 6742e4d6520f5706f65b7ec4403803fd14d0c9d1 Mon Sep 17 00:00:00 2001 From: Mike Jackson Date: Tue, 2 Apr 2013 08:59:35 -0700 Subject: [PATCH] Removed exception --- testing/dna.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/testing/dna.py b/testing/dna.py index a0fc0ec..4cf4f0e 100755 --- a/testing/dna.py +++ b/testing/dna.py @@ -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 -- 2.26.2