DOC: Add comments about python style. scipy2010
authorChristopher Burns <chris.d.burns@gmail.com>
Tue, 29 Jun 2010 01:17:52 -0500
branchscipy2010
changeset 433 af45c8da1d5d
parent 432 13e5d0e2cd40
child 434 99e1af343b04
DOC: Add comments about python style.
day2/session4.tex
--- a/day2/session4.tex	Tue Jun 29 00:59:26 2010 -0500
+++ b/day2/session4.tex	Tue Jun 29 01:17:52 2010 -0500
@@ -252,6 +252,7 @@
         \item Readability Counts!\\Code is read more often than its written.
         \item Consistency!
         \item Know when to be inconsistent.
+        \item Play telephone with that line of code.
       \end{itemize}
 \end{frame}
 
@@ -259,8 +260,8 @@
   \begin{lstlisting}
     amount = 12.68
     denom = 0.05
-    nCoins = round(amount/denom)
-    rAmount = nCoins * denom
+    num_coins = round(amount/denom)
+    rounded_amount = num_coins * denom
   \end{lstlisting}
   \pause
   \begin{block}{Style Rule \#1}
@@ -276,6 +277,7 @@
         \item Maximum Line Length
         \item Blank Lines
         \item Encodings
+        \item Consider any legible book
    \end{itemize}
 \end{frame}
 
@@ -301,8 +303,15 @@
         \item Ending the docstrings
         \item One liner docstrings
    \end{itemize}
-More information at PEP8: http://www.python.org/dev/peps/pep-0008/
-\inctime{5}
+\end{frame}
+
+\begin{frame}{The Python Style Guide}
+  \begin{itemize}
+   \item PEP8
+   \item PEP8
+   \item PEP8
+   \item \url{http://www.python.org/dev/peps/pep-0008/}
+   \end{itemize}
 \end{frame}
 
 \section{Debugging}