Skip to content

Instantly share code, notes, and snippets.

@isidentical
Created Jun 14, 2020
Embed
What would you like to do?
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