You'll go beyond basic classes to master Python's data model. By implementing "dunder" methods, you will build custom types that integrate seamlessly with Python's core features, like iteration and context management. This course will make your code more Pythonic, expressive, and efficient.
Overview
Syllabus
- Unit 1: Dunder Methods and Value Types
- Pretty Printing Vector Objects
- When Books Are Equal
- Books Unlock Collection Power
- Building Comparable Software Versions
- Money Class Bug Hunt
- Unit 2: Iteration Protocols and Generators
- Building Your First Data Stream
- Building Your First Filter Generator
- Building Your First Data Transformer
- Building Your First Generator Pipeline
- The Zero Sum Mystery
- Unit 3: Context Managers Explained
- Building Your First Context Manager
- Context Manager Resource Cleanup
- Build a Code Timer
- Building Error Filters
- Managing Temporary System Settings
- Unit 4: Attribute Access Laziness
- Adding Dynamic Attributes to Money
- Building Efficient User Profiles
- Find the Hidden Performance Bug
- Dynamic Currency Conversion Interface