Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think so. I think the other code should just stop using isinstance checks and switch to some custom function. I personally think isinstance checks benefit from having its behavior simpler and less dynamic.

> check if a class implements an interface, without explicitly inheriting ABC or Protocol

This really doesn't sound like a feature that belongs in the language. Go do something custom if you really want it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: