Skip to content

The Python data model

Coming soon

Implement dunder methods like __repr__, __str__, __eq__, __len__, and __getitem__.

You'll be able to

  • Provide developer-friendly strings with __repr__ and user strings with __str__
  • Implement equality and sorting with __eq__ and __lt__
  • Make objects emulate sequences with __len__ and __getitem__

Coming soon

This lesson is being written. The Telegram channel announces new lessons as they open.