Python class that returns False with bool(TheClassItself) – stackoverflow.com

I want to create, in Python 3, a class MyClass where bool(MyClass) returns False. Is it possible? Notice that I want this behavior with the class itself, not objects of that class. For objects of ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Python class that returns False with bool(TheClassItself) – stackoverflow.com"