placeholder

Hasnain says:

The examples here are basically black magic.

“Should I use this?

God no.

The pattern matching feature is, on the whole, pretty reasonably designed, and people will expect it to behave in reasonable ways. Whereas __subclasshook__ is extremely dark magic. This kind of chicanery might have a place in the dark beating heart of a complex library, certainly not for any code your coworkers will have to deal with.”

Posted on 2022-08-04T04:27:43+0000