diff options
-rwxr-xr-x | day1/Session-3.tex | 45 |
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} |