Contribute Media
A thank you to everyone who makes this possible: Read More

A Magic Implementation of NotImplemented

Description

[EuroPython 2023 — Terrace 2B on 2023-07-20]

https://ep2023.europython.eu/session/a-magic-implementation-of-notimplemented

[Dirty Equals](https://github.com/samuelcolvin/dirty-equals) is a new python library by Samuel Colvin, the creator of Pydantic. It will transform how you write tests, especially for APIs.

I made some contributions to it, which forever changed how I thought about NotImplemented. I thought it was a placeholder for unfinished work and unexpected use cases. I thought the language quirks it created in equality comparison were annoying.

But in DirtyEquals, it’s a magic way to transform Python’s built in equality operator... And that changed how I think about language quirks, full stop.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License http://creativecommons.org/licenses/by-nc-sa/4.0/

Improve this page