Created
June 14, 2020 18:49
-
-
Save isidentical/3c247f1aba272db830efbb5e253e922d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
@object.__new__ | |
class Maybe: | |
def __bool__(self): | |
return random.choice((True, False)) | |
print(bool(Maybe), bool(Maybe), bool(Maybe)) | |
print(Maybe is Maybe) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment