DOC: More slides on whitespace. scipy2010
authorChristopher Burns <chris.d.burns@gmail.com>
Tue, 29 Jun 2010 01:40:24 -0500
branchscipy2010
changeset 434 99e1af343b04
parent 433 af45c8da1d5d
child 435 2aed1dda7909
DOC: More slides on whitespace.
day2/session4.tex
--- a/day2/session4.tex	Tue Jun 29 01:17:52 2010 -0500
+++ b/day2/session4.tex	Tue Jun 29 01:40:24 2010 -0500
@@ -289,6 +289,31 @@
    \end{itemize}
 \end{frame}
 
+\begin{frame}[fragile]
+ \frametitle{Whitespace}
+ Whitespace... it's not just for compilers!
+  \begin{lstlisting}
+
+def myfanfunc(somevar,another,yetmore):
+    if a%b==0:return b
+    return myfanfunc(b,a%b)
+      
+  \end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Whitespace}
+ The compiler doesn't care!  Humans do!
+  \begin{lstlisting}
+
+def my_fan_func(some_var, another, yet_more):
+    if a % b == 0:
+        return b
+    return my_fan_func(b, a % b)
+      
+  \end{lstlisting}
+\end{frame}
+
 \begin{frame}{Comments}
   \begin{itemize}
         \item No comments better than contradicting comments