5. Working With Files
❖
What’s simpler than open(“path/to/file”) ?
❖
Don’t forget to close the file (finally:)
❖
And even cleaner way use managed context (with:)
❖
File-like objects.
7. Reading Options
❖
from optparse import OptionParser
❖
Adding options (short and long), setting default values and
errors
❖
using __main__ the entry point.
9. Functional Programing
❖
Python is a multi-paradigm language (What does that
mean?)
❖
Functions are objects and they are first class variables.
❖
Higher order functions
❖
Remember the first hangout example ?
10. Functional Programing (2)
❖
Anonymous functions (lambda)
❖
Nested functions (function that defines function)
❖
Closures and “Lexical Scoping” issue.
❖
Operators as functions
❖
Trying doctest.
❖
Decorators and (@notation).