Hacker News new | ask | show | jobs
by zzzeek 2 days ago
Hi, don't mind me, but

You don't need to return a boolean. You need to return an object that implements __bool__.

Get it ?

And even then, when you're dealing with objects that are special to expressions, you don't actually even need __bool__ that much