Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

The Python Data Model & Protocols

via CodeSignal

Overview

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.

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

Reviews

Start your review of The Python Data Model & Protocols

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.