Week 7: Python Details#
- Real world Python
- Defining your own modules
- Defining modules
- Nested modules
- __name__ == “__main__”
- Get you a module that can do both
- Variable arity with *args
- Variable arity minimum and maximum
- Named arguments with defaults with keyword arguments and **kw
- Sort by key
- Anonymous functions with lambda
- Anonymous function practice
- Iterables
- The Collatz conjecture
- Making generators with the yield keyword
- Practice with generators
- Comprehensions
- Practice with comprehensions
- Arithmetic overloading
- Practice with overloading
- Unpacking patterns
- Enumerations of fixed values
- Type annotations
- Decorators change behavior
- Document field names and types with data classes
- Further reading