summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantosh G. Vattam2009-10-06 12:44:23 +0530
committerSantosh G. Vattam2009-10-06 12:44:23 +0530
commit905f69f11741adfead2c0f44284bcf0482b7eaf1 (patch)
tree034c1b4c953ac78de7e3abc89b256b43556111a1
parent4d4b05b4f26121c400407e085ca71cca86537fb8 (diff)
downloadworkshops-more-scipy-905f69f11741adfead2c0f44284bcf0482b7eaf1.tar.gz
workshops-more-scipy-905f69f11741adfead2c0f44284bcf0482b7eaf1.tar.bz2
workshops-more-scipy-905f69f11741adfead2c0f44284bcf0482b7eaf1.zip
Updated Coding Style slides.
-rwxr-xr-xday1/Session-3.tex45
1 files changed, 45 insertions, 0 deletions
diff --git a/day1/Session-3.tex b/day1/Session-3.tex
index 1979c43..52b36c9 100755
--- a/day1/Session-3.tex
+++ b/day1/Session-3.tex
@@ -374,4 +374,49 @@ for line in urllib2.urlopen('http://site.com'):
Functions (and others) are first-class objects. Can be passed to and returned from functions.
\inctime{10}
\end{frame}
+
+\subsection{Coding Style in Python}
+\begin{frame}{Readability and Consistency}
+ \begin{itemize}
+ \item Readability Counts!-Code is read more often than its written.
+ \item Consistency!
+ \item Know when to be inconsistent.
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Code Layout}
+ \begin{itemize}
+ \item Indentation
+ \item Tabs or Spaces??
+ \item Maximum Line Length
+ \item Blank Lines
+ \item Encodings
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Whitespaces in Expressions}
+ \begin{itemize}
+ \item When to use extraneous whitespaces??
+ \item When to avoid extra whitespaces??
+ \item Use one statement per line
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Comments}
+ \begin{itemize}
+ \item No comments better than contradicting comments
+ \item Block comments
+ \item Inline comments
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Docstrings}
+ \begin{itemize}
+ \item When to write docstrings?
+ \item Ending the docstrings
+ \item One liner docstrings
+ \end{itemize}
+\end{frame}
+\inctime{10}
\end{document}