# HG changeset patch # User Christopher Burns # Date 1277669814 18000 # Node ID 11c942a85b3f584c0c03e5f7badc4727a245a15f # Parent 5f43f3020c51e4dd585f0742023eefb54cb17801 REF: Reformat some of the if-blocks so it's a little more clear. diff -r 5f43f3020c51 -r 11c942a85b3f day1/session3.tex --- a/day1/session3.tex Tue Jun 22 00:03:19 2010 -0700 +++ b/day1/session3.tex Sun Jun 27 15:16:54 2010 -0500 @@ -361,16 +361,17 @@ \begin{frame}[fragile] \frametitle{Building parsed data \ldots} \begin{lstlisting} -if region_code not in science: - science[region_code] = 0 + if region_code not in science: + science[region_code] = 0 -score_str = fields[6].strip() + score_str = fields[6].strip() -score = int(score_str) if \ - score_str != 'AA' else 0 + score = 0 + if score_str != 'AA': + score = int(score_str) -if score > 90: - science[region_code] += 1 + if score > 90: + science[region_code] += 1 \end{lstlisting} \end{frame} @@ -425,8 +426,9 @@ fields = record.split(';') score_str = fields[5].strip() - score = int(score_str) if \ - score_str != 'AA' else 0 + score = 0 + if score_str != 'AA': + score = int(score_str) math_scores.append(score) \end{lstlisting}